UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

48 lines (47 loc) 1.87 kB
import _extends from "@babel/runtime/helpers/extends"; /** * @file Icon stories. * @copyright IBM Security 2019 - 2021 */ import { Add20, Add24, Add32 } from '@carbon/icons-react'; import { miniUnits } from '@carbon/layout'; import { storiesOf } from '@storybook/react'; import React from 'react'; import { components } from '../../../.storybook'; import theme from '../../globals/theme'; import { Icon } from '../..'; import { renderIcon } from './_mocks_'; import { InlineNotification, NotificationActionButton } from '../../'; import { Grid } from 'carbon-components-react'; var iconProps = { style: { fill: theme.icon01, margin: miniUnits(1) } }; storiesOf(components('Icon#legacy'), module).addDecorator(function (Story) { return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(InlineNotification, { className: "page-layouts__banner", actions: /*#__PURE__*/React.createElement(NotificationActionButton, { href: "https://react.carbondesignsystem.com/?path=/story/elements-icons--default", rel: "noopener noreferrer", target: "_blank" }, "View replacement"), kind: "info", subtitle: "Component no longer supported. The component will remain available, but plan to migrate to the component replacement.", title: "", hideCloseButton: true }), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Story, null))); }).add('Default', function () { return /*#__PURE__*/React.createElement(React.Fragment, null, [renderIcon, Add20, Add24, Add32].map(function (size, index) { var key = "icon__".concat(index); return /*#__PURE__*/React.createElement(Icon, _extends({ key: key, renderIcon: size }, iconProps)); })); }, { info: { text: "\n Basic implementation of an Icon component.\n " } });