blob: a0fa0483fd986c1d3c390c99680ba1161fa75f1e (
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>
)
}
|