@kobalte/core
Version:
Unstyled components and primitives for building accessible web apps and design systems with SolidJS.
24 lines (20 loc) • 556 B
JavaScript
import { Polymorphic } from '../chunk/6Y7B2NEO.js';
import { createComponent, mergeProps } from 'solid-js/web';
import { splitProps } from 'solid-js';
function BadgeRoot(props) {
const [local, others] = splitProps(props, ["textValue"]);
return createComponent(Polymorphic, mergeProps({
as: "span",
role: "status",
get ["aria-label"]() {
return local.textValue;
}
}, others, {
get children() {
return others.children;
}
}));
}
// src/badge/index.tsx
var Badge = BadgeRoot;
export { Badge, BadgeRoot as Root };