Download chakra-ui/packages/react/__tests__/breakpoints.test.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 2.21 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/__tests__/breakpoints.test.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/__tests__/breakpoints.test.ts
-
curl -L -o breakpoints.test.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/__tests__/breakpoints.test.ts
2.21 kB
| import { createBreakpoints } from "../src/styled-system/breakpoints" | |
| describe("breakpoints", () => { | |
| test("works", () => { | |
| const result = createBreakpoints({ | |
| sm: "30em", | |
| md: "48em", | |
| lg: "62em", | |
| xl: "80em", | |
| "2xl": "96em", | |
| }) | |
| expect(result.conditions).toMatchInlineSnapshot(` | |
| { | |
| "2xl": "@media screen and (min-width: 96rem)", | |
| "2xlDown": "@media screen and (max-width: 95.9975rem)", | |
| "2xlOnly": "@media screen and (min-width: 96rem)", | |
| "lg": "@media screen and (min-width: 62rem)", | |
| "lgDown": "@media screen and (max-width: 61.9975rem)", | |
| "lgOnly": "@media screen and (min-width: 62rem) and (max-width: 79.9975rem)", | |
| "lgTo2xl": "@media screen and (min-width: 62rem) and (max-width: 95.9975rem)", | |
| "lgToXl": "@media screen and (min-width: 62rem) and (max-width: 79.9975rem)", | |
| "md": "@media screen and (min-width: 48rem)", | |
| "mdDown": "@media screen and (max-width: 47.9975rem)", | |
| "mdOnly": "@media screen and (min-width: 48rem) and (max-width: 61.9975rem)", | |
| "mdTo2xl": "@media screen and (min-width: 48rem) and (max-width: 95.9975rem)", | |
| "mdToLg": "@media screen and (min-width: 48rem) and (max-width: 61.9975rem)", | |
| "mdToXl": "@media screen and (min-width: 48rem) and (max-width: 79.9975rem)", | |
| "sm": "@media screen and (min-width: 30rem)", | |
| "smDown": "@media screen and (max-width: 29.9975rem)", | |
| "smOnly": "@media screen and (min-width: 30rem) and (max-width: 47.9975rem)", | |
| "smTo2xl": "@media screen and (min-width: 30rem) and (max-width: 95.9975rem)", | |
| "smToLg": "@media screen and (min-width: 30rem) and (max-width: 61.9975rem)", | |
| "smToMd": "@media screen and (min-width: 30rem) and (max-width: 47.9975rem)", | |
| "smToXl": "@media screen and (min-width: 30rem) and (max-width: 79.9975rem)", | |
| "xl": "@media screen and (min-width: 80rem)", | |
| "xlDown": "@media screen and (max-width: 79.9975rem)", | |
| "xlOnly": "@media screen and (min-width: 80rem) and (max-width: 95.9975rem)", | |
| "xlTo2xl": "@media screen and (min-width: 80rem) and (max-width: 95.9975rem)", | |
| } | |
| `) | |
| }) | |
| }) | |