Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/scripts/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class Select extends Component<SelectProps, SelectState> {
}

export type OptionProps = {
label: string | number;
label?: string | number;
} & Omit<React.OptionHTMLAttributes<HTMLOptionElement>, 'label'>;

export const Option: React.FC<OptionProps> = (props) => {
Expand Down
8 changes: 4 additions & 4 deletions stories/FormStories.js → stories/FormStories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ storiesOf('Form', module)
</FieldSet>
<FieldSet label='Address'>
<Row>
<Textarea label='Street' rows='2' placeholder='Input street here' />
<Textarea label='Street' rows={2} placeholder='Input street here' />
</Row>
<Row>
<Input label='City' size='40' placeholder='Input city here' />
<Input label='City' size={40} placeholder='Input city here' />
</Row>
<Row>
<Select label='State' defaultValue={1}>
<Select label='State' defaultValue='1'>
<Option value='CA'>California</Option>
<Option value='OR'>Oregon</Option>
<Option value='WA'>Washington</Option>
</Select>
<Input label='Postal Code' type='number' placeholder='00000' />
<Select label='Country' defaultValue={1}>
<Select label='Country' defaultValue='1'>
<Option value='us'>United States</Option>
<Option value='ca'>Canada</Option>
<Option value='other' disabled>
Expand Down
8 changes: 4 additions & 4 deletions test/storyshots/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6799,7 +6799,7 @@ exports[`Storyshots Form Compound Form 1`] = `
id="form-element-$uuid$"
onChange={[Function]}
placeholder="Input street here"
rows="2"
rows={2}
/>
</div>
</div>
Expand All @@ -6825,7 +6825,7 @@ exports[`Storyshots Form Compound Form 1`] = `
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Input city here"
size="40"
size={40}
/>
</div>
</div>
Expand All @@ -6847,7 +6847,7 @@ exports[`Storyshots Form Compound Form 1`] = `
>
<select
className="slds-select"
defaultValue={1}
defaultValue="1"
id="form-element-$uuid$"
onChange={[Function]}
>
Expand Down Expand Up @@ -6905,7 +6905,7 @@ exports[`Storyshots Form Compound Form 1`] = `
>
<select
className="slds-select"
defaultValue={1}
defaultValue="1"
id="form-element-$uuid$"
onChange={[Function]}
>
Expand Down