1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

change name of hook to be useKebabifiedMenu

This commit is contained in:
John Mitchell 2020-08-11 14:43:59 -04:00 committed by John Mitchell
parent 8f04026404
commit a352de3da7
3 changed files with 5 additions and 5 deletions

View File

@ -10,10 +10,10 @@ import {
} from '@patternfly/react-core';
import { ToolbarAddButton } from '../PaginatedDataList';
import { toTitleCase } from '../../util/strings';
import { useKebabified } from '../../contexts/Kebabified';
import { useKebabifiedMenu } from '../../contexts/Kebabified';
function AddDropDownButton({ dropdownItems, i18n }) {
const { isKebabified } = useKebabified();
const { isKebabified } = useKebabifiedMenu();
const [isOpen, setIsOpen] = useState(false);
const element = useRef(null);

View File

@ -4,10 +4,10 @@ import { Link } from 'react-router-dom';
import { Button, DropdownItem, Tooltip } from '@patternfly/react-core';
import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { useKebabified } from '../../contexts/Kebabified';
import { useKebabifiedMenu } from '../../contexts/Kebabified';
function ToolbarAddButton({ linkTo, onClick, i18n, isDisabled }) {
const { isKebabified } = useKebabified();
const { isKebabified } = useKebabifiedMenu();
if (!linkTo && !onClick) {
throw new Error(

View File

@ -5,4 +5,4 @@ export const KebabifiedContext = React.createContext({});
export const KebabifiedProvider = KebabifiedContext.Provider;
export const Kebabified = KebabifiedContext.Consumer;
export const useKebabified = () => useContext(KebabifiedContext);
export const useKebabifiedMenu = () => useContext(KebabifiedContext);