Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Bug] fix radio button style (#1310)
Shan He28f5204d3d91
diff --git a/src/components/common/checkbox.js b/src/components/common/checkbox.jsindex 597970cdd..0bc11828a 100644--- a/src/components/common/checkbox.js+++ b/src/components/common/checkbox.js@@ -46,7 +46,7 @@ const HiddenInput = styled.input`const StyledCheckbox = styled.div`display: flex;min-height: ${props => props.theme.switchHeight}px;- margin-left: ${props => props.theme.switchLabelMargin}px;+ margin-left: ${props => (props.type === 'radio' ? 0 : props.theme.switchLabelMargin)}px;`;export default class Checkbox extends Component {@@ -110,7 +110,10 @@ export default class Checkbox extends Component {: StyledSwitchInput;return (- <StyledCheckbox className={classnames('kg-checkbox', this.props.className)}>+ <StyledCheckbox+ type={this.props.type}+ className={classnames('kg-checkbox', this.props.className)}+ ><HiddenInput {...inputProps} /><LabelElement className="kg-checkbox__label" {...labelProps}>{this.props.label}diff --git a/src/styles/base.js b/src/styles/base.jsindex 6e9109c54..8479ae49e 100644--- a/src/styles/base.js+++ b/src/styles/base.js@@ -732,6 +732,7 @@ const inputRadio = css`margin-bottom: 0;margin-left: 0;line-height: ${props => props.theme.radioRadius * 2}px;+ color: ${props => props.theme.textColorHl};cursor: pointer;:before {