Skip to main content
Glama
searchInput.stories.tsx2.1 kB
import type { Meta, StoryObj } from '@storybook/react'; import { InputSize, InputVariant } from './Input'; import { SearchInput } from './SearchInput'; const meta: Meta<typeof SearchInput> = { title: 'Components/SearchInput', component: SearchInput, tags: ['autodocs'], argTypes: { placeholder: { description: 'Placeholder text for the search input field', control: 'text', defaultValue: 'Search…', }, variant: { description: 'Visual style of the input', control: { type: 'select' }, options: Object.values(InputVariant), defaultValue: InputVariant.DEFAULT, }, size: { description: 'Input size', control: { type: 'select' }, options: Object.values(InputSize), defaultValue: InputSize.MD, }, validationStyleEnabled: { description: 'Enable native valid/invalid outline styles', control: { type: 'boolean', allowUndefined: true }, defaultValue: undefined, }, disabled: { description: 'Disable the input', control: { type: 'boolean', allowUndefined: true }, defaultValue: undefined, }, className: { description: 'Additional CSS classes', control: 'text', }, }, } satisfies Meta<typeof SearchInput>; export default meta; type Story = StoryObj<typeof SearchInput>; const Template: Story = { args: { placeholder: 'Search…', variant: InputVariant.DEFAULT, size: InputSize.MD, validationStyleEnabled: false, disabled: false, }, }; export const Default: Story = { ...Template }; export const Invisible: Story = { ...Template, args: { ...Template.args, variant: InputVariant.INVISIBLE, }, }; export const Large: Story = { ...Template, args: { ...Template.args, size: InputSize.LG, }, }; export const WithValidationStyle: Story = { ...Template, args: { ...Template.args, validationStyleEnabled: true, placeholder: 'Search and blur to validate', }, }; export const Disabled: Story = { ...Template, args: { ...Template.args, disabled: true, }, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server