File size: 2,664 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{
  "name": "aspect-ratio",
  "snippet": null,
  "examples": [
    {
      "name": "aspect-ratio-basic",
      "content": "export const AspectRatioBasic = () => {\n  return (\n    <AspectRatio bg=\"bg.muted\" ratio={2 / 1}>\n      <Center fontSize=\"xl\">2 / 1</Center>\n    </AspectRatio>\n  )\n}\n",
      "hasSnippet": false,
      "importPaths": [
        "import { AspectRatio, Center } from \"@chakra-ui/react\""
      ],
      "importPath": "import { AspectRatio } from \"@chakra-ui/react\""
    },
    {
      "name": "aspect-ratio-responsive",
      "content": "export const AspectRatioResponsive = () => (\n  <AspectRatio maxWidth=\"300px\" ratio={{ base: 1, md: 16 / 9 }}>\n    <Box>Box</Box>\n  </AspectRatio>\n)\n",
      "hasSnippet": false,
      "importPaths": [
        "import { AspectRatio } from \"@chakra-ui/react\"",
        "import { Box } from \"@chakra-ui/react\""
      ],
      "importPath": "import { AspectRatio } from \"@chakra-ui/react\""
    },
    {
      "name": "aspect-ratio-with-image",
      "content": "export const AspectRatioWithImage = () => {\n  return (\n    <AspectRatio maxW=\"400px\" ratio={4 / 3}>\n      <Image src=\"https://bit.ly/naruto-sage\" alt=\"naruto\" objectFit=\"cover\" />\n    </AspectRatio>\n  )\n}\n",
      "hasSnippet": false,
      "importPaths": [
        "import { AspectRatio, Image } from \"@chakra-ui/react\""
      ],
      "importPath": "import { AspectRatio } from \"@chakra-ui/react\""
    },
    {
      "name": "aspect-ratio-with-map",
      "content": "export const AspectRatioWithMap = () => {\n  return (\n    <AspectRatio ratio={16 / 9}>\n      <iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3963.952912260219!2d3.375295414770757!3d6.5276316452784755!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x103b8b2ae68280c1%3A0xdc9e87a367c3d9cb!2sLagos!5e0!3m2!1sen!2sng!4v1567723392506!5m2!1sen!2sng\" />\n    </AspectRatio>\n  )\n}\n",
      "hasSnippet": false,
      "importPaths": [
        "import { AspectRatio } from \"@chakra-ui/react\""
      ],
      "importPath": "import { AspectRatio } from \"@chakra-ui/react\""
    },
    {
      "name": "aspect-ratio-with-video",
      "content": "export const AspectRatioWithVideo = () => {\n  return (\n    <AspectRatio maxW=\"560px\" ratio={1}>\n      <iframe\n        title=\"naruto\"\n        src=\"https://www.youtube.com/embed/QhBnZ6NPOY0\"\n        allowFullScreen\n      />\n    </AspectRatio>\n  )\n}\n",
      "hasSnippet": false,
      "importPaths": [
        "import { AspectRatio } from \"@chakra-ui/react\""
      ],
      "importPath": "import { AspectRatio } from \"@chakra-ui/react\""
    }
  ]
}