UNPKG

wix-style-react

Version:
47 lines (40 loc) 1.31 kB
import * as React from 'react'; import CodeExample from 'wix-storybook-utils/CodeExample'; import ExampleBadgesRaw from '!raw-loader!./ExampleBadges'; import ExampleBadges from './ExampleBadges'; import { SIZE, SKIN, TYPE, default as Badge } from '../../src/Badge'; import Facebook from 'wix-ui-icons-common/Facebook'; import ChevronDown from 'wix-ui-icons-common/ChevronDown'; export default { category: '12. Other', storyName: '12.1 Badge', component: Badge, componentPath: '../../src/Badge/Badge.js', componentProps: { children: "I'm a badge!", skin: 'general', type: 'solid', size: 'medium', uppercase: true, dataHook: 'storybook-badge' }, exampleProps: { skin: Object.keys(SKIN), type: Object.keys(TYPE), size: Object.keys(SIZE), prefixIcon: [React.createElement(ChevronDown, { key: '0' }), React.createElement(Facebook, { key: '1' })], suffixIcon: [React.createElement(ChevronDown, { key: '2' }), React.createElement(Facebook, { key: '3' })], onClick: function onClick() { return alert('Badge Clicked'); } }, examples: React.createElement( 'div', null, React.createElement( CodeExample, { title: 'Variations', code: ExampleBadgesRaw }, React.createElement(ExampleBadges, null) ) ) };