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