File tree Expand file tree Collapse file tree
apps/webapp/app/components/primitives Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,12 +204,12 @@ export function ButtonContent(props: ButtonContentPropsType) {
204204 const textColorClassName = variation . textColor ;
205205
206206 const renderShortcutKey = ( ) =>
207- shortcut && (
207+ shortcut &&
208+ ! hideShortcutKey && (
208209 < ShortcutKey
209210 className = { cn ( shortcutClassName ) }
210211 shortcut = { shortcut }
211212 variant = { variation . shortcutVariant ?? "medium" }
212- hideShortcutKey = { hideShortcutKey }
213213 />
214214 ) ;
215215
Original file line number Diff line number Diff line change @@ -33,23 +33,17 @@ type ShortcutKeyProps = {
3333 shortcut : ShortcutKeyDefinition ;
3434 variant : ShortcutKeyVariant ;
3535 className ?: string ;
36- hideShortcutKey ?: boolean ;
3736} ;
3837
39- export function ShortcutKey ( {
40- shortcut,
41- variant,
42- className,
43- hideShortcutKey = false ,
44- } : ShortcutKeyProps ) {
38+ export function ShortcutKey ( { shortcut, variant, className } : ShortcutKeyProps ) {
4539 const { platform } = useOperatingSystem ( ) ;
4640 const isMac = platform === "mac" ;
4741 let relevantShortcut = "mac" in shortcut ? ( isMac ? shortcut . mac : shortcut . windows ) : shortcut ;
4842 const modifiers = relevantShortcut . modifiers ?? [ ] ;
4943 const character = relevantShortcut . key ? keyString ( relevantShortcut . key , isMac , variant ) : null ;
5044
5145 return (
52- < span className = { cn ( variants [ variant ] , hideShortcutKey && "hidden" , className ) } >
46+ < span className = { cn ( variants [ variant ] , className ) } >
5347 { modifiers . map ( ( k ) => (
5448 < span key = { k } >
5549 < span > { modifierString ( k , isMac , variant ) } </ span >
You can’t perform that action at this time.
0 commit comments