(props: { expanded: boolean })
| 63 | } |
| 64 | |
| 65 | const Expander = (props: { expanded: boolean }) => { |
| 66 | const theme = useTheme() |
| 67 | const css = useQueryDevtoolsContext().shadowDOMTarget |
| 68 | ? goober.css.bind({ target: useQueryDevtoolsContext().shadowDOMTarget }) |
| 69 | : goober.css |
| 70 | const styles = createMemo(() => { |
| 71 | return theme() === 'dark' ? darkStyles(css) : lightStyles(css) |
| 72 | }) |
| 73 | |
| 74 | return ( |
| 75 | <span |
| 76 | class={cx( |
| 77 | styles().expander, |
| 78 | css` |
| 79 | transform: rotate(${props.expanded ? 90 : 0}deg); |
| 80 | `, |
| 81 | props.expanded && |
| 82 | css` |
| 83 | & svg { |
| 84 | top: -1px; |
| 85 | } |
| 86 | `, |
| 87 | )} |
| 88 | > |
| 89 | <svg |
| 90 | width="16" |
| 91 | height="16" |
| 92 | viewBox="0 0 16 16" |
| 93 | fill="none" |
| 94 | xmlns="http://www.w3.org/2000/svg" |
| 95 | > |
| 96 | <path |
| 97 | d="M6 12L10 8L6 4" |
| 98 | stroke-width="2" |
| 99 | stroke-linecap="round" |
| 100 | stroke-linejoin="round" |
| 101 | /> |
| 102 | </svg> |
| 103 | </span> |
| 104 | ) |
| 105 | } |
| 106 | |
| 107 | type CopyState = 'NoCopy' | 'SuccessCopy' | 'ErrorCopy' |
| 108 | const CopyButton = (props: { value: unknown }) => { |
nothing calls this directly
no test coverage detected