style={{ lineHeight: '64px' }} <Menu.Item key="/"><Link to="/">Track Stories</Link></Menu.Item> <Menu.Item key="/statistics"><Link to="/statistics">Statistics</Link></Menu.Item> </Menu> </Header> }} <Breadcrumb.Item> <Link to="/">Dashboard</Link> </Breadcrumb.Item> {match && match.params && match.params.storyId && ( <Breadcrumb.Item>Story #{match.params.storyId}</Breadcrumb.Item> )} </Breadcrumb>
pathSnippets.map((url, index) => { const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); if (currentBreadcrumb.inherited) { return null; } const isLinkable = index !== pathSnippets.length - 1 && currentBreadcrumb.component; const name = itemRender ? itemRender(currentBreadcrumb) : currentBreadcrumb.name; return currentBreadcrumb.name && !currentBreadcrumb.hideInBreadcrumb ? ( <Breadcrumb.Item key={url}> {createElement( isLinkable ? linkElement : 'span', { [linkElement === 'a' ? 'href' : 'to']: url }, name )} </Breadcrumb.Item> ) : null; })
const hocComponent = ({ ...props }) => ( <Fragment> <Breadcrumb style={{ margin: "16px 0" }}> {crumbs.map(item => { const [title, path] = [].concat(item); return ( <Breadcrumb.Item key={title}> {path ? <NavLink to={path}>{title}</NavLink> : title} </Breadcrumb.Item> ); })} </Breadcrumb> <WrappedComponent {...props} /> </Fragment> )
const App = ()=> { return ( <Layout className="layout"> <Header style={{ background: '#fff', padding: '0 275px' }}> <Icon className={'trigger'} type={'menu-fold'} /> ASCII STORE </Header> <Content style={{ padding: '0 300px' }}> <Breadcrumb style={{ margin: '16px 0' }}> <Breadcrumb.Item>Home</Breadcrumb.Item> <Breadcrumb.Item>Products Page</Breadcrumb.Item> </Breadcrumb> <div style={{ background: '#fff', padding: 24, minHeight: 280 }}> <List/> </div> </Content> <Footer style={{ textAlign: 'center' }}>Ant Design ©2018 Created by Ant UED</Footer> </Layout> ); }
const hocComponent = ({ ...props }) => ( <Fragment> <Breadcrumb style={{ margin: "16px 0" }}> {crumbs.map(item => { const [title, path] = [].concat(item); return ( <Breadcrumb.Item key={title}> {path ? <NavLink to={path}>{title}</NavLink> : title} </Breadcrumb.Item> ); })} </Breadcrumb> <WrappedComponent {...props} /> </Fragment> )
pathSnippets.map((url, index) => { const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); if (currentBreadcrumb.inherited) { return null; } const isLinkable = index !== pathSnippets.length - 1 && currentBreadcrumb.component; const name = itemRender ? itemRender(currentBreadcrumb) : currentBreadcrumb.name; return currentBreadcrumb.name && !currentBreadcrumb.hideInBreadcrumb ? ( <Breadcrumb.Item key={url}> {createElement( isLinkable ? linkElement : 'span', { [linkElement === 'a' ? 'href' : 'to']: url }, name )} </Breadcrumb.Item> ) : null; })
pathSnippets.map((url, index) => { const currentBreadcrumb = getBreadcrumb(breadcrumbNameMap, url); if (currentBreadcrumb.inherited) { return null; } const isLinkable = index !== pathSnippets.length - 1 && currentBreadcrumb.component; const name = itemRender ? itemRender(currentBreadcrumb) : currentBreadcrumb.name; return currentBreadcrumb.name && !currentBreadcrumb.hideInBreadcrumb ? ( <Breadcrumb.Item key={url}> {createElement( isLinkable ? linkElement : 'span', { [linkElement === 'a' ? 'href' : 'to']: url }, name )} </Breadcrumb.Item> ) : null; })