Skip to content

Commit

Permalink
Merge pull request #365 from kiwicom/fix/radio-type
Browse files Browse the repository at this point in the history
FIX: Incorrect type in <Radio />
Luděk Vepřek authored Sep 19, 2018
2 parents b8319de + 1c02e8e commit 2278c0e
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/Radio/__snapshots__/Radio.stories.storyshot
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ exports[`Storyshots Radio Default 1`] = `
className="Radio__Input-fvWuwA ftXShs"
disabled={false}
onChange={[Function]}
type="checkbox"
type="radio"
value={undefined}
/>
<div
@@ -394,7 +394,7 @@ exports[`Storyshots Radio Playground 1`] = `
className="Radio__Input-fvWuwA ftXShs"
disabled={true}
onChange={[Function]}
type="checkbox"
type="radio"
value="value"
/>
<div
@@ -778,7 +778,7 @@ exports[`Storyshots Radio With help 1`] = `
className="Radio__Input-fvWuwA ftXShs"
disabled={false}
onChange={[Function]}
type="checkbox"
type="radio"
value="value"
/>
<div
2 changes: 1 addition & 1 deletion src/Radio/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -787,7 +787,7 @@ exports[`Default CheckBox should match snapshot 1`] = `
},
}
}
type="checkbox"
type="radio"
value="option"
/>
<Radio__IconContainer
8 changes: 1 addition & 7 deletions src/Radio/index.js
Original file line number Diff line number Diff line change
@@ -144,13 +144,7 @@ const Radio = (props: Props) => {

return (
<Label disabled={disabled} tokens={tokens}>
<Input
value={value}
type="checkbox"
disabled={disabled}
checked={checked}
onChange={onChange}
/>
<Input value={value} type="radio" disabled={disabled} checked={checked} onChange={onChange} />
<IconContainer tokens={tokens}>
<Glyph disabled={disabled} />
</IconContainer>

0 comments on commit 2278c0e

Please sign in to comment.