()
| 5 | import { Tooltip } from "@ark-ui/react"; |
| 6 | |
| 7 | export default function DemoEntrypoint() { |
| 8 | const [key, setKey] = useState(0); |
| 9 | |
| 10 | return ( |
| 11 | <div className={css({ pos: "relative" })}> |
| 12 | <AppExampleSandbox key={key} Example={Demo} /> |
| 13 | |
| 14 | <div |
| 15 | className={css({ pos: "absolute", top: 0, left: 0, mt: "4", ml: "4" })} |
| 16 | > |
| 17 | <Tooltip.Root openDelay={0} positioning={{ strategy: "fixed" }}> |
| 18 | <Tooltip.Trigger |
| 19 | type="button" |
| 20 | className={css({ |
| 21 | rounded: "full", |
| 22 | bgColor: "white", |
| 23 | px: "2", |
| 24 | py: "0.5", |
| 25 | fontSize: "xs", |
| 26 | fontWeight: "semibold", |
| 27 | shadow: "1", |
| 28 | borderWidth: "1", |
| 29 | borderColor: "gray.300", |
| 30 | cursor: "pointer", |
| 31 | _hover: { bgColor: "gray.50" }, |
| 32 | })} |
| 33 | onClick={() => { |
| 34 | setKey(key + 1); |
| 35 | }} |
| 36 | > |
| 37 | <svg |
| 38 | xmlns="http://www.w3.org/2000/svg" |
| 39 | fill="none" |
| 40 | viewBox="0 0 24 24" |
| 41 | stroke-width="1.5" |
| 42 | stroke="currentColor" |
| 43 | className={css({ h: "5", w: "5", color: "gray.900" })} |
| 44 | > |
| 45 | <path |
| 46 | strokeLinecap="round" |
| 47 | strokeLinejoin="round" |
| 48 | d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" |
| 49 | /> |
| 50 | </svg> |
| 51 | </Tooltip.Trigger> |
| 52 | |
| 53 | <Tooltip.Positioner> |
| 54 | <Tooltip.Content |
| 55 | className={css({ |
| 56 | background: "gray.950", |
| 57 | borderRadius: "sm", |
| 58 | boxShadow: "sm", |
| 59 | color: "white", |
| 60 | fontWeight: "semibold", |
| 61 | px: "3", |
| 62 | py: "2", |
| 63 | textStyle: "xs", |
| 64 | _open: { |
nothing calls this directly
no outgoing calls
no test coverage detected