Skip to content

Commit 02f5c2b

Browse files
committed
docs: Added kbd component in docs.
1 parent 3ccab01 commit 02f5c2b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

dev/components/kbd.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { FlowProps } from 'solid-js';
2+
3+
export function Kbd(props: FlowProps<{ activated: boolean }>) {
4+
return (
5+
<div class="relative text-xs">
6+
<div class="absolute inset-0 rounded-md bg-neutral-200 transition"></div>
7+
<div
8+
class="relative transform rounded-md border bg-neutral-50 px-2 py-1.5 transition-transform"
9+
style={{
10+
transform: props.activated ? 'translateY(0px)' : 'translateY(-5px)',
11+
}}
12+
>
13+
{props.children}
14+
</div>
15+
</div>
16+
);
17+
}

0 commit comments

Comments
 (0)