import { Meta, Story } from '@storybook/react';
import React from 'react';
import { RPGUIRoot } from '../../../../src';
import {
  IInputProps,
  Input as InputComponent,
} from '../../../../src/components/Input';
import {
  ITextArea,
  TextArea as TextAreaComponent,
} from '../../../../src/components/TextArea';

const meta: Meta = {
  title: 'UI/Typography/Text',
  component: InputComponent,
};

export default meta;

const InputTemplate: Story<IInputProps> = args => (
  <RPGUIRoot>
    <InputComponent {...args} />
  </RPGUIRoot>
);

export const Input = InputTemplate.bind({});

Input.args = {
  placeholder: 'Test placeholder',
};

const TextAreaTemplate: Story<ITextArea> = args => (
  <RPGUIRoot>
    <TextAreaComponent {...args} />
  </RPGUIRoot>
);

export const TextArea = TextAreaTemplate.bind({});

TextArea.args = {
  placeholder: 'Test placeholder',
};
