Second pass on component refactor

This commit is contained in:
adilallo
2026-01-29 17:35:51 -07:00
parent 7b9101824a
commit b5735bb2ad
26 changed files with 778 additions and 491 deletions
@@ -0,0 +1,34 @@
import type { ToggleGroupViewProps } from "./ToggleGroup.types";
export function ToggleGroupView({
groupId,
children,
className,
position,
state,
showText,
ariaLabel,
toggleClasses,
onClick,
onKeyDown,
onFocus,
onBlur,
...rest
}: ToggleGroupViewProps) {
return (
<button
id={groupId}
type="button"
role="button"
aria-label={ariaLabel || (showText ? undefined : "Toggle option")}
onClick={onClick}
onKeyDown={onKeyDown}
onFocus={onFocus}
onBlur={onBlur}
className={toggleClasses}
{...rest}
>
{showText ? children : children || "☰"}
</button>
);
}