import React, { ReactChild } from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { EllipsisText, EllipsisTextProps } from '.';

export default {
  title: 'Ellipsis Text',
  component: EllipsisText,
} as Meta;

const Template: Story<EllipsisTextProps> = (args) => <EllipsisText {...args} />;

export const Default = Template.bind({});
Default.args = {
  children: `This is a long long long text and need to ellipsis This is a long long long text and need to ellipsis This is a long long long text and need to ellipsis`,
  width: '200px',
} as EllipsisTextProps & { children?: ReactChild };

export const MultiLine = Template.bind({});
MultiLine.args = {
  children: `This is a long long long text and need to ellipsis This is a long long long text and need to ellipsis This is a long long long text and need to ellipsis`,
  width: '200px',
  multiline: 3,
} as EllipsisTextProps & { children?: ReactChild };
