import * as React from 'react'; import { Row, Col, Typography, Card } from 'antd'; import { RightOutlined, LeftOutlined } from '@ant-design/icons'; import { FormattedMessage, useIntl } from 'react-intl'; import { Link } from 'bisheng/router'; import { getLocalizedPathname } from '../../utils'; import './index.less'; import Certainty from './Certainty'; import Meaningful from './Meaningful'; import Growth from './Growth'; import Natural from './Natural'; import SiteContext from '../../Layout/SiteContext'; const { Title } = Typography; interface PanelProps { img: string; title: React.ReactNode; description: string; href?: string; link?: string; } const MINI_LIST: PanelProps[] = [ { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*ZhzDQLMyYlYAAAAAAAAAAABkARQnAQ', title: 'AntV', description: 'app.home.product-antv-slogan', href: 'https://antv.vision', }, { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*I-ygS5prYksAAAAAAAAAAABkARQnAQ', title: 'Ant Design Pro', description: 'app.home.product-pro-slogan', href: 'https://pro.ant.design/', }, { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*mb-WQILTlSEAAAAAAAAAAABkARQnAQ', title: 'Ant Design Mobile', description: 'app.home.product-mobile-slogan', href: 'https://mobile.ant.design/', }, { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*PrLWSpmWZmIAAAAAAAAAAABkARQnAQ', title: , description: 'app.home.product-hitu-slogan', link: '/docs/spec/illustration', }, { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*MaL2SYtHPuMAAAAAAAAAAABkARQnAQ', title: 'Kitchen', description: 'app.home.product-kitchen-slogan', href: 'https://kitchen.alipay.com/', }, { img: 'https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*T_HeSIJ30IIAAAAAAAAAAABkARQnAQ', title: 'Icons', description: 'app.home.product-icons-slogan', link: '/components/icon/', }, ]; const MiniPanel = ({ title, img, description, href, link, isZhCN, }: PanelProps & { isZhCN: boolean }) => { let content = ( } > } /> ); if (href) { content = ( {content} ); } else if (link) { content = {content}; } return ( {content} ); }; export default function DesignPage() { const { locale } = useIntl(); const isZhCN = locale === 'zh-CN'; const { direction } = React.useContext(SiteContext); let IconComponent = ; if (direction === 'rtl') { IconComponent = ; } return (
{/* ***************************** Group 1 ***************************** */} {/* *********************** Design Values *********************** */}
<FormattedMessage id="app.home.design-values" /> {IconComponent} certainty

meaningful

growth

natural

{/* *********************** Design Guides *********************** */}
<FormattedMessage id="app.home.design-guide" />
  • {IconComponent}
  • {IconComponent}
design guide
{/* ************************* Component ************************* */}
<FormattedMessage id="app.home.components" /> components
{/* ***************************** Group 2 ***************************** */} {MINI_LIST.map(panel => ( ))}
); }