@carbon/ibm-security
Version:
Carbon for Cloud & Cognitive IBM Security UI components
22 lines (21 loc) • 739 B
JavaScript
/**
* @file String formatter stories.
* @copyright IBM Security 2019 - 2021
*/
import { boolean, text, number } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import React from 'react';
import { components } from '../../../.storybook';
import { StringFormatter } from '../..';
import value from './_mocks_';
var storyProps = function storyProps() {
return {
lines: number('Lines (`lines`)', 1),
truncate: boolean('Truncate (`truncate`)', true),
value: text('Value (`value`)', value),
width: text('Width (`width`)', "200px")
};
};
storiesOf(components('StringFormatter'), module).add('Default', function () {
return /*#__PURE__*/React.createElement(StringFormatter, storyProps());
});