29 lines
672 B
TypeScript
29 lines
672 B
TypeScript
import { IconX } from '@/ui/display/icon';
|
|
import { IconButton } from '@/ui/input/button/components/IconButton';
|
|
|
|
import {
|
|
StyledContainer,
|
|
StyledDialog,
|
|
StyledHeading,
|
|
} from './KeyboardShortcutMenuStyles';
|
|
|
|
type KeyboardMenuDialogProps = {
|
|
onClose: () => void;
|
|
children: React.ReactNode | React.ReactNode[];
|
|
};
|
|
|
|
export const KeyboardMenuDialog = ({
|
|
onClose,
|
|
children,
|
|
}: KeyboardMenuDialogProps) => {
|
|
return (
|
|
<StyledDialog>
|
|
<StyledHeading>
|
|
Keyboard shortcuts
|
|
<IconButton variant="tertiary" Icon={IconX} onClick={onClose} />
|
|
</StyledHeading>
|
|
<StyledContainer>{children}</StyledContainer>
|
|
</StyledDialog>
|
|
);
|
|
};
|