blob: 15c1e5d6959fcd9c8447400c1f0021cf0933dca3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
import type { HTMLAttributes } from "corvos/plugins/jsx.ts";
export type Props = HTMLAttributes<"a"> & {
selected?: boolean;
};
export const Tab = ({ selected, class: cls, ...props }: Props) => (
<a
aria-selected={`${selected}`}
class:list={["o-tabbar__tab", { "is-selected": selected }, cls]}
role="tab"
{...props}
/>
);
|