You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] ToggleButtonGroup: className, style and other host props never reach the group element #8926
ToggleButtonGroup accepts no className or style, and passes nothing beyond data-testid and xstyle to its root. Its props interface (ToggleButtonGroup.tsx:77) does not extend BaseProps, and the role="group" root (ToggleButtonGroup.tsx:227) spreads no caller props. TypeScript rejects className and style; at runtime they are dropped, and so are id, aria-* and other data-* attributes.
BaseProps describes itself as the base "extended by all component prop interfaces", and ToggleButton itself took className in #6943. A team styling with CSS classes or a utility framework, or a wrapper that forwards host attributes, cannot reach the group without a wrapper element. This is the same gap #8755 closes for Overlay, DropdownMenuGroup and MobileNavToggle (architecture:public-component-api INV5).
Expected: the group extends BaseProps<HTMLDivElement> and spreads the remaining props onto its root, with its own role, aria-label and theme target applied after the spread.
Reproduction
import{ToggleButton,ToggleButtonGroup}from'@astryxdesign/core';exportfunctionRepro(){return(<ToggleButtonGrouplabel="Alignment"type="single"value={null}onChange={()=>{}}// @ts-expect-error not in the props typeclassName="toolbar-group"style={{marginTop: 8}}><ToggleButtonlabel="Left"value="left"/><ToggleButtonlabel="Right"value="right"/></ToggleButtonGroup>);}
Render the example and inspect the role="group" element.
It has neither the toolbar-group class nor the inline style.
Astryx Version
@astryxdesign/core@0.7.4; still present on main (14fc587).
Activity