diff --git a/src/components/atoms/Input/index.mocks.json b/src/components/atoms/Input/index.mocks.json index 36e67011..3a6ae6b6 100644 --- a/src/components/atoms/Input/index.mocks.json +++ b/src/components/atoms/Input/index.mocks.json @@ -9,6 +9,9 @@ "basicExample": { "type": "text" }, + "withPlaceholder": { + "placeholder": "Here the user will see this until you type something" + }, "withText": { "text": "Welcome to reactive-bulma" }, diff --git a/src/components/atoms/Input/index.stories.tsx b/src/components/atoms/Input/index.stories.tsx index 17230863..6242243b 100644 --- a/src/components/atoms/Input/index.stories.tsx +++ b/src/components/atoms/Input/index.stories.tsx @@ -18,6 +18,9 @@ const Template: StoryFn = args => export const BasicExample = Template.bind({}) +export const WithPlaceholder = Template.bind({}) +WithPlaceholder.args = testing.withPlaceholder as InputProps + export const WithText = Template.bind({}) WithText.args = testing.withText as InputProps diff --git a/src/components/atoms/Input/index.tsx b/src/components/atoms/Input/index.tsx index ba066d66..535516bc 100644 --- a/src/components/atoms/Input/index.tsx +++ b/src/components/atoms/Input/index.tsx @@ -10,6 +10,7 @@ const Input: React.FC = ({ style = null, type, text = null, + placeholder = null, isDisabled = false, isReadonly = false, color = null, @@ -40,6 +41,7 @@ const Input: React.FC = ({