UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

38 lines (37 loc) 1.69 kB
import _extends from "@babel/runtime/helpers/extends"; /** * @file Profile image stories. * @copyright IBM Security 2019 - 2021 */ import { boolean, object } from '@storybook/addon-knobs'; import { storiesOf } from '@storybook/react'; import React from 'react'; import { components } from '../../../.storybook'; import { ProfileImage } from '../..'; import { className, large, profile } from './_mocks_'; import { InlineNotification, NotificationActionButton } from '../../'; import { Grid } from 'carbon-components-react'; var profileImageProps = function profileImageProps() { return { className: className, large: boolean('Large (large)', large) }; }; storiesOf(components('ProfileImage#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://v1-ibm-products.carbondesignsystem.com/?path=/story/ibm-products-patterns-user-profile-images-userprofileimage--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(ProfileImage, _extends({}, profileImageProps(), { profile: object('Profile (profile)', profile) })); });