diff --git a/src/components/data-entry/QueryItem/TextInput.stories.tsx b/src/components/data-entry/QueryItem/TextInput.stories.tsx index ca2477a33..f58084347 100644 --- a/src/components/data-entry/QueryItem/TextInput.stories.tsx +++ b/src/components/data-entry/QueryItem/TextInput.stories.tsx @@ -21,6 +21,22 @@ export default meta; type Story = StoryObj -export const Primary: Story = { - -} \ No newline at end of file +export const Default: Story = { + args: { + value: 'Primary', + }, +} + + +export const Placeholder: Story = { + args: { + placeholder: 'Placeholder', + }, +} + + +export const ErrorMessage: Story = { + args: { + errorMessage: 'Required field!', + }, +} diff --git a/src/components/data-entry/QueryItem/TextInput.tsx b/src/components/data-entry/QueryItem/TextInput.tsx index 2e0a6cd46..955db0501 100644 --- a/src/components/data-entry/QueryItem/TextInput.tsx +++ b/src/components/data-entry/QueryItem/TextInput.tsx @@ -8,6 +8,7 @@ interface ITextInputProps { value?: string disabled?: boolean errorMessage?: string + placeholder?: string } export const TextInput = (props: ITextInputProps) => { @@ -28,6 +29,7 @@ export const TextInput = (props: ITextInputProps) => { disabled={props.disabled} className={inputClasses} value={props.value} + placeholder={props.placeholder} onChange={_onChange}> {props.errorMessage && {props.errorMessage}}