|
- import * as React from 'react';
- import type { Meta } from '@storybook/react';
- import { TextControl } from '@tesseract-design/web-base';
- import { UrlInput as Component, UrlInputProps as Props } from '.';
-
- const meta: Meta<typeof Component> = {
- component: Component,
- argTypes: {
- label: {
- control: { type: 'text' },
- },
- hint: {
- control: { type: 'text' },
- },
- variant: {
- control: {
- type: 'select',
- },
- options: TextControl.AVAILABLE_VARIANTS,
- },
- size: {
- control: {
- type: 'select',
- },
- options: TextControl.AVAILABLE_SIZES,
- },
- length: {
- control: {
- type: 'number',
- },
- },
- onChange: {
- table: {
- disable: true,
- },
- action: 'changed',
- },
- },
- args: {
- ...(Component.defaultProps ?? {}),
- label: Component.displayName,
- },
- };
-
- export const UrlInput = (args: Omit<Props, 'ref'>) => (
- <Component
- {...args}
- />
- );
-
- export default meta;
|