Download chakra-ui/packages/react/src/theme/recipes/qr-code.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/theme/recipes/qr-code.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/theme/recipes/qr-code.ts
-
curl -L -o qr-code.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/theme/recipes/qr-code.ts
1.36 kB
| import { qrCodeAnatomy } from "../../anatomy" | |
| import { defineSlotRecipe } from "../../styled-system" | |
| export const qrCodeSlotRecipe = defineSlotRecipe({ | |
| slots: qrCodeAnatomy.keys(), | |
| className: "chakra-qr-code", | |
| base: { | |
| root: { | |
| position: "relative", | |
| width: "fit-content", | |
| "--qr-code-overlay-size": "calc(var(--qr-code-size) / 3)", | |
| }, | |
| frame: { | |
| width: "var(--qr-code-size)", | |
| height: "var(--qr-code-size)", | |
| fill: "currentColor", | |
| }, | |
| overlay: { | |
| display: "flex", | |
| alignItems: "center", | |
| justifyContent: "center", | |
| width: "var(--qr-code-overlay-size)", | |
| height: "var(--qr-code-overlay-size)", | |
| padding: "1", | |
| bg: "bg", | |
| rounded: "l1", | |
| }, | |
| }, | |
| variants: { | |
| size: { | |
| "2xs": { | |
| root: { "--qr-code-size": "40px" }, | |
| }, | |
| xs: { | |
| root: { "--qr-code-size": "64px" }, | |
| }, | |
| sm: { | |
| root: { "--qr-code-size": "80px" }, | |
| }, | |
| md: { | |
| root: { "--qr-code-size": "120px" }, | |
| }, | |
| lg: { | |
| root: { "--qr-code-size": "160px" }, | |
| }, | |
| xl: { | |
| root: { "--qr-code-size": "200px" }, | |
| }, | |
| "2xl": { | |
| root: { "--qr-code-size": "240px" }, | |
| }, | |
| full: { | |
| root: { "--qr-code-size": "100%" }, | |
| }, | |
| }, | |
| }, | |
| defaultVariants: { | |
| size: "md", | |
| }, | |
| }) | |