Skip to content

Commit

Permalink
Remove default argument values in InfoField (#463)
Browse files Browse the repository at this point in the history
- Removes default arg values in `<InfoField>`
- Adds args to InfoField story
  • Loading branch information
rocketnova authored Sep 14, 2021
2 parents 72d5437 + 1c463cf commit 0f32698
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions components/InfoField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ export interface InfoFieldProps {
text: string
}

export const InfoField: React.FC<InfoFieldProps> = ({
loading = false,
label = 'Label text!',
text = 'Field text!',
}) => {
export const InfoField: React.FC<InfoFieldProps> = ({ loading = false, label, text }) => {
if (loading) {
return <ShimmerField />
}
Expand Down
5 changes: 4 additions & 1 deletion stories/InfoField.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@ export default {
const Template: Story<InfoFieldProps> = (args) => <InfoFieldComponent {...args} />

export const InfoField = Template.bind({})
InfoField.args = {}
InfoField.args = {
label: 'Label text!',
text: 'Field text!',
}

0 comments on commit 0f32698

Please sign in to comment.