()
| 17 | ({ title, children, onToggle, active, ...props }, ref) => { |
| 18 | const { side } = useToolbarContext() |
| 19 | const renderButton = () => ( |
| 20 | <Button |
| 21 | css={[ |
| 22 | tw`shadow-none w-7 h-7`, |
| 23 | css` |
| 24 | &[data-active='true'] { |
| 25 | ${tw`text-primary bg-blue-100 border-blue-100 hover:bg-blue-100 hover:text-primary hover:border-blue-100`} |
| 26 | } |
| 27 | `, |
| 28 | children && tw`w-auto`, |
| 29 | ]} |
| 30 | data-active={active || undefined} |
| 31 | onClick={onToggle} |
| 32 | type={active ? 'primary' : 'text'} |
| 33 | {...props} |
| 34 | ref={ref} |
| 35 | > |
| 36 | {children} |
| 37 | </Button> |
| 38 | ) |
| 39 | return title ? ( |
| 40 | <Tooltip content={title} side={side}> |
| 41 | {renderButton()} |
no outgoing calls
no test coverage detected
searching dependent graphs…