feat(desktop): add layout transition switch (#36667)
Co-authored-by: Brendan Allan <git@brendonovich.dev>
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
import { type ComponentProps, splitProps } from "solid-js"
|
||||
import "./badge-v2.css"
|
||||
|
||||
export interface TagProps extends ComponentProps<"span"> {}
|
||||
export interface TagProps extends ComponentProps<"span"> {
|
||||
variant?: "neutral" | "accent"
|
||||
}
|
||||
|
||||
export function Tag(props: TagProps) {
|
||||
const [split, rest] = splitProps(props, ["class", "classList", "children"])
|
||||
const [split, rest] = splitProps(props, ["class", "classList", "children", "variant"])
|
||||
return (
|
||||
<span
|
||||
{...rest}
|
||||
data-component="tag"
|
||||
data-variant={split.variant ?? "neutral"}
|
||||
classList={{
|
||||
...split.classList,
|
||||
[split.class ?? ""]: !!split.class,
|
||||
|
||||
Reference in New Issue
Block a user