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