(props: { expanded: boolean; onClick: () => void })
| 408 | } |
| 409 | |
| 410 | const Expander = (props: { expanded: boolean; onClick: () => void }) => { |
| 411 | const styles = createStyles() |
| 412 | return ( |
| 413 | <span |
| 414 | onClick={props.onClick} |
| 415 | class={clsx( |
| 416 | styles().tree.expander, |
| 417 | css` |
| 418 | transform: rotate(${props.expanded ? 90 : 0}deg); |
| 419 | `, |
| 420 | props.expanded && |
| 421 | css` |
| 422 | & svg { |
| 423 | top: -1px; |
| 424 | } |
| 425 | `, |
| 426 | )} |
| 427 | > |
| 428 | <svg |
| 429 | width="16" |
| 430 | height="16" |
| 431 | viewBox="0 0 16 16" |
| 432 | fill="none" |
| 433 | xmlns="http://www.w3.org/2000/svg" |
| 434 | > |
| 435 | <path |
| 436 | d="M6 12L10 8L6 4" |
| 437 | stroke-width="2" |
| 438 | stroke-linecap="round" |
| 439 | stroke-linejoin="round" |
| 440 | /> |
| 441 | </svg> |
| 442 | </span> |
| 443 | ) |
| 444 | } |
nothing calls this directly
no test coverage detected