UNPKG

wix-style-react

Version:
39 lines (37 loc) 1.2 kB
import React from 'react'; import styles from './ExampleBreadcrumbs.scss'; import Breadcrumbs from '../../src/Breadcrumbs/Breadcrumbs'; var items = [{ id: '1', value: 'first item' }, { id: '2', value: 'second item' }, { id: '3', value: 'third item' }]; var itemsWithLinks = [{ id: '1', value: 'Wix', link: 'http://www.wix.com' }, { id: '2', value: 'Google', customElement: React.createElement( 'a', { style: { color: 'inherit', textDecoration: 'inherit' }, href: 'http://www.google.com' }, 'Google' ) }, { id: '3', value: 'Yahoo', link: 'http://www.yahoo.com' }]; export default (function () { return React.createElement( 'div', null, React.createElement( 'div', { className: styles.onGrayBackground + ' ' + styles.exampleWrapper }, 'Without links', React.createElement(Breadcrumbs, { dataHook: 'story-breadcrumbs-no-links', items: items }) ), React.createElement( 'div', { className: styles.onGrayBackground + ' ' + styles.exampleWrapper }, 'With links', React.createElement(Breadcrumbs, { dataHook: 'story-breadcrumbs-with-links', items: itemsWithLinks }) ) ); });