import { forwardRef } from 'react'; import { StyledKBD, StyledKBDKey } from './KBD.style'; export interface KBDProps extends React.ComponentPropsWithRef<'kbd'> { children?: React.ReactNode; meta?: boolean; shift?: boolean; alt?: boolean; ctrl?: boolean; } export const KBD = forwardRef( ({ children, meta, shift, alt, ctrl, ...props }, ref) => { return ( {meta && } {shift && } {alt && } {ctrl && } {children && {children}} ); } );