| 49 | export const ToggleButton: s.ParentComponent< |
| 50 | s.ComponentProps<'button'> & {onInteract: (selected: boolean) => void; selected: boolean} |
| 51 | > = props => { |
| 52 | |
| 53 | props = combineProps(props, { |
| 54 | class: toggle_button, |
| 55 | get 'aria-selected'() {return props.selected}, |
| 56 | onClick() {props.onInteract(!props.selected)}, |
| 57 | }) |
| 58 | |
| 59 | // ! createToggleButton doesn't seems to passing class to buttonProps |
| 60 | // let ref!: HTMLButtonElement |
| 61 | // const { buttonProps } = createToggleButton(props, () => ref) |
| 62 | |
| 63 | return <button {...props} /> |
| 64 | } |
| 65 | |
| 66 | export const CollapseToggle: s.Component<{ |
| 67 | class?: string |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…