UNPKG

@carbon/ibm-security

Version:

Carbon for Cloud & Cognitive IBM Security UI components

24 lines (23 loc) 871 B
/** * @file External link stories. * @copyright IBM Security 2019 - 2021 */ import { text } from '@storybook/addon-knobs'; import { storiesOf } from '@storybook/react'; import React from 'react'; import { components } from '../../../.storybook'; import { carbonPrefix } from '../../globals/namespace'; import { ExternalLink } from '../..'; import props from './_mocks_'; var href = props.href; var storyProps = function storyProps() { return { href: text('Link (`href`)', href), children: text('Children (`children`)', href) }; }; storiesOf(components('ExternalLink'), module).add('Default', function () { return /*#__PURE__*/React.createElement("p", { className: "".concat(carbonPrefix, "--type-body-long-01") }, "This is an external link ", /*#__PURE__*/React.createElement(ExternalLink, storyProps()), " that appears alongside some text."); });