import type { JSX } from "solid-js";
import { splitProps } from "solid-js";
import type { BadgeProps } from "./badge.props";
export type { BadgeProps } from "./badge.props";

/** A status badge that announces its content to screen readers via role="status". */
export function Badge(props: BadgeProps): JSX.Element {
	const [local, rest] = splitProps(props, ["children"]);
	return (
		<span role="status" {...rest}>
			{local.children}
		</span>
	);
}
