import React from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { UrlInput, UrlInputProps } from '.';

export default {
  title: 'UrlInput',
  component: UrlInput,
  argTypes: {
    onChange: { action: 'onChange' },
    onFormattedValueSet: { action: 'onFormattedValueSet' },
  },
} as Meta;

const Template: Story<UrlInputProps> = (args) => <UrlInput {...args} />;

export const Default = Template.bind({});
Default.args = {
  placeholder: `Type a url and it will add http:\\\\ automatically`,
} as UrlInputProps;

export const Https = Template.bind({});
Https.args = {
  https: true,
} as UrlInputProps;
