From 33165a55c2106a8803a5d21c281462bbc38dcc0e Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Sat, 15 Jun 2019 11:21:35 +0200 Subject: [PATCH] fix: remove spacing left to the checkbox icon in FF (#283) * fix(checkbox): fix spacing in ff * fix(radio): fix spacing in ff * fix(switch): fix spacing in ff --- src/Checkbox/Input.js | 10 ++++------ src/Radio/index.js | 33 +++++++++++++++++++++++++++++++-- src/Switch/index.js | 34 +++++++++++++++++++++++++++++----- 3 files changed, 64 insertions(+), 13 deletions(-) diff --git a/src/Checkbox/Input.js b/src/Checkbox/Input.js index a2f149982..eb70ece27 100644 --- a/src/Checkbox/Input.js +++ b/src/Checkbox/Input.js @@ -23,7 +23,7 @@ export class Input extends Component { } = this.props return ( - +
- +
) } } diff --git a/src/Radio/index.js b/src/Radio/index.js index d6e2a272a..6b359abfe 100644 --- a/src/Radio/index.js +++ b/src/Radio/index.js @@ -42,6 +42,36 @@ const icons = css.resolve` } ` +const Input = React.forwardRef( + ( + { name, value, checked, disabled, tabIndex, onChange, onFocus, onBlur }, + ref + ) => ( +
+ + + +
+ ) +) + class Radio extends Component { ref = createRef() @@ -113,9 +143,8 @@ class Radio extends Component { disabled, })} > - ( +
+ + + +
+ ) +) + class Switch extends Component { ref = createRef() state = { @@ -56,15 +81,14 @@ class Switch extends Component { focus, })} > -