mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
cleanup
This commit is contained in:
@@ -86,25 +86,3 @@
|
|||||||
overscroll-behavior-x: contain;
|
overscroll-behavior-x: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shortcut-key {
|
|
||||||
@apply inline-flex;
|
|
||||||
@apply font-sans;
|
|
||||||
@apply text-xs;
|
|
||||||
@apply rounded;
|
|
||||||
@apply px-2;
|
|
||||||
@apply min-w-[1.5rem];
|
|
||||||
@apply min-h-[1.5rem];
|
|
||||||
@apply leading-none;
|
|
||||||
@apply items-center;
|
|
||||||
@apply justify-center;
|
|
||||||
@apply shadow-sm;
|
|
||||||
@apply border;
|
|
||||||
|
|
||||||
background-color: rgba(0, 0, 0, 0.2);
|
|
||||||
border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
|
|
||||||
&:not(:last-child) {
|
|
||||||
@apply mr-1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -56,9 +56,9 @@ const ShortcutItem = ({ shortcut }: { shortcut: any }) => {
|
|||||||
<div key={index} className="flex items-center gap-1">
|
<div key={index} className="flex items-center gap-1">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{key.split("+").map((keyPart: string, partIndex: number) => (
|
{key.split("+").map((keyPart: string, partIndex: number) => (
|
||||||
<kbd key={partIndex} className="shortcut-key">
|
<ShortcutKey key={partIndex}>
|
||||||
{getKeyWithModifier(keyPart)}
|
{getKeyWithModifier(keyPart)}
|
||||||
</kbd>
|
</ShortcutKey>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{index < displayKeys.length - 1 && (
|
{index < displayKeys.length - 1 && (
|
||||||
@@ -119,3 +119,17 @@ export const KeyboardShortcutsHelp = () => {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function ShortcutKey({ children }: { children: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<kbd
|
||||||
|
className="inline-flex font-sans text-xs rounded px-2 min-w-[1.5rem] min-h-[1.5rem] leading-none items-center justify-center shadow-sm border mr-1"
|
||||||
|
style={{
|
||||||
|
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
||||||
|
borderColor: "rgba(255, 255, 255, 0.1)"
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</kbd>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user