blob: 5c347cb541cbc1e6dc578bea883c277c55bfcae9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import type { ComponentProps, ParentProps } from "solid-js"
export interface KeybindProps extends ParentProps {
class?: string
classList?: ComponentProps<"span">["classList"]
}
export function Keybind(props: KeybindProps) {
return (
<span
data-component="keybind"
classList={{
...props.classList,
[props.class ?? ""]: !!props.class,
}}
>
{props.children}
</span>
)
}
|