|
1 | 1 | import * as Chakra from '@chakra-ui/react'
|
2 |
| -import * as React from 'react' |
3 |
| -import PropsTable from '../props-table' |
4 |
| -import CarbonAd from './carbon-ad' |
5 |
| -import CodeBlock from './codeblock/codeblock' |
6 |
| -import ComponentLinks from './component-links' |
7 |
| -import { FeaturesCourses } from './course-banner' |
8 |
| -import IconsList from './icons-list' |
9 | 2 | import {
|
10 | 3 | ColorPalette,
|
11 | 4 | ColorPalettes,
|
12 | 5 | ColorWrapper,
|
13 | 6 | } from 'components/color-palette'
|
| 7 | +import { JoinCommunityCards } from 'components/community-card' |
14 | 8 | import { FeaturesOverview } from 'components/features-overview'
|
15 | 9 | import { FrameworkLinks } from 'components/framework-link'
|
16 | 10 | import { Anchor } from 'components/mdx-components/anchor'
|
17 | 11 | import { InlineCode } from 'components/mdx-components/inline-code'
|
18 | 12 | import { LinkedHeading } from 'components/mdx-components/linked-heading'
|
19 | 13 | import { Pre } from 'components/mdx-components/pre'
|
20 |
| -import { TData, THead, Table } from 'components/mdx-components/table' |
21 |
| -import { VideoPlayer } from 'components/mdx-components/video-player' |
| 14 | +import { Table, TData, THead } from 'components/mdx-components/table' |
| 15 | +import { PackageManagers } from 'components/package-managers' |
22 | 16 | import SandpackEmbed from 'components/sandpack-embed'
|
23 | 17 | import { TutorialCodeBlock } from 'components/tutorial/tutorial-code-block'
|
24 | 18 | import { TutorialFileAction } from 'components/tutorial/tutorial-file-action'
|
25 |
| -import { JoinCommunityCards } from 'components/community-card' |
26 |
| -import { PackageManagers } from 'components/package-managers' |
27 | 19 | import NextImage from 'next/image'
|
| 20 | +import { FiFigma } from 'react-icons/fi' |
| 21 | +import PropsTable from '../props-table' |
| 22 | +import CarbonAd from './carbon-ad' |
| 23 | +import CodeBlock from './codeblock/codeblock' |
| 24 | +import ComponentLinks from './component-links' |
| 25 | +import { FeaturesCourses } from './course-banner' |
| 26 | +import IconsList from './icons-list' |
| 27 | +import { VideoPlayer } from './video-player' |
28 | 28 |
|
29 | 29 | const { Alert, AspectRatio, Box, chakra, Kbd, Link } = Chakra
|
30 | 30 |
|
31 | 31 | export const MDXComponents = {
|
32 | 32 | ...Chakra,
|
33 |
| - Image: (props) => ( |
34 |
| - <Box my='5'> |
| 33 | + FiFigma, |
| 34 | + Image: ({ ratio, border, src, ...props }: any) => ( |
| 35 | + <AspectRatio |
| 36 | + my='5' |
| 37 | + position='relative' |
| 38 | + borderWidth={border ? '1px' : undefined} |
| 39 | + ratio={ratio} |
| 40 | + > |
35 | 41 | <NextImage
|
36 |
| - layout='responsive' |
37 |
| - width={700} |
38 |
| - height={400} |
| 42 | + src={src} |
| 43 | + alt='' |
| 44 | + layout='fill' |
39 | 45 | objectFit='contain'
|
40 | 46 | {...props}
|
41 | 47 | />
|
42 |
| - </Box> |
| 48 | + </AspectRatio> |
43 | 49 | ),
|
44 | 50 | LinkedImage: ({ href, ...props }) => (
|
45 | 51 | <Link display='block' my='10' href={href} isExternal>
|
|
0 commit comments