import { DemoStory } from '../../demo/demo-types'; import { SearchInput, SearchInputHookProps } from './search-input'; import { NotificationMessage, NotificationColor } from '../../components/notice-message'; export const searchInputDemo: DemoStory = { id: 'search-input-demo', text: 'Search Input', args: { placeholder: 'Search here...', }, argTypes: { placeholder: { control: 'text' }, }, render: (args: any) => { const hook: SearchInputHookProps = {}; const handleSearch = (val: string) => { if (!val) { NotificationMessage.sendMessage('Please enter a keyword', NotificationColor.Warning); return; } NotificationMessage.sendMessage(`Searching for: ${val}`, NotificationColor.Success); }; const handleClear = () => { NotificationMessage.sendMessage('Input cleared', NotificationColor.Info); }; const handleSetValue = () => { if (hook.setValue) { hook.setValue('Lupine.js'); } }; return (

Search Input Demo

A simple search input component with clear button functionality.

); }, };