diff --git a/src/components/Checkbox/Checkbox.tsx b/src/components/Checkbox/Checkbox.tsx index 5100af48b..f73c209f1 100644 --- a/src/components/Checkbox/Checkbox.tsx +++ b/src/components/Checkbox/Checkbox.tsx @@ -38,7 +38,7 @@ const WithTapAreaWrapper = styled.div>` align-items: center; height: 1rem; - margin: 0 0.5rem 0 0; + margin: 0; ${({ textVerticalAlign }) => (textVerticalAlign === 'top' ? 'margin-top: 0.1875rem' : undefined)} `; diff --git a/src/components/Checkbox/components/LabelWrapper.tsx b/src/components/Checkbox/components/LabelWrapper.tsx index ea139e479..8e706d2c1 100644 --- a/src/components/Checkbox/components/LabelWrapper.tsx +++ b/src/components/Checkbox/components/LabelWrapper.tsx @@ -79,6 +79,8 @@ const LabelWrapper = styled.label.attrs({ theme })` font-family: ${get('fonts.normal')}; line-height: 1; + gap: 0.5rem; + &:hover { ${hoverStyle} } diff --git a/src/components/Checkbox/docs/Checkbox.stories.tsx b/src/components/Checkbox/docs/Checkbox.stories.tsx index 64092f872..02aeaf76d 100644 --- a/src/components/Checkbox/docs/Checkbox.stories.tsx +++ b/src/components/Checkbox/docs/Checkbox.stories.tsx @@ -23,7 +23,11 @@ export default meta; type Story = StoryObj; -export const Default: Story = {}; +export const Default: Story = { + args: { + label: undefined + } +}; export const Selected: Story = { args: { diff --git a/src/components/RadioButton/RadioButton.tsx b/src/components/RadioButton/RadioButton.tsx index 4687e9abe..153827900 100644 --- a/src/components/RadioButton/RadioButton.tsx +++ b/src/components/RadioButton/RadioButton.tsx @@ -10,7 +10,7 @@ import { TapArea } from './components/TapArea'; import { RadioButtonProps } from './RadioButtonProps'; const WithTapAreaWrapper = styled.div>` - width: 1.5rem; + width: 1rem; position: relative; display: inline-flex; align-items: center; diff --git a/src/components/RadioButton/components/Checkmark.tsx b/src/components/RadioButton/components/Checkmark.tsx index db1aabc2a..55068ff2f 100644 --- a/src/components/RadioButton/components/Checkmark.tsx +++ b/src/components/RadioButton/components/Checkmark.tsx @@ -15,7 +15,7 @@ const Checkmark = styled.input` width: 1rem; height: 1rem; padding: 0; - margin: 0 0.5rem 0 0; + margin: 0; background-color: ${getSemanticValue('background-page-default')}; box-shadow: inset 0 0 0 0.125rem diff --git a/src/components/RadioButton/components/LabelWrapper.tsx b/src/components/RadioButton/components/LabelWrapper.tsx index fcf0385f8..6dcc3dbf9 100644 --- a/src/components/RadioButton/components/LabelWrapper.tsx +++ b/src/components/RadioButton/components/LabelWrapper.tsx @@ -63,6 +63,8 @@ const LabelWrapper = styled.label.attrs({ theme })` font-family: ${get('fonts.normal')}; line-height: 1; + gap: 0.5rem; + &:hover { ${hoverStyle} } diff --git a/src/components/Toggle/Label.tsx b/src/components/Toggle/Label.tsx index aa10a31d2..d95b5f23a 100644 --- a/src/components/Toggle/Label.tsx +++ b/src/components/Toggle/Label.tsx @@ -11,6 +11,8 @@ const Label = styled.label` cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')}; user-select: none; + gap: 0.5rem; + ${margin} `; diff --git a/src/components/Toggle/Slide.tsx b/src/components/Toggle/Slide.tsx index a4891e895..45b92ab42 100644 --- a/src/components/Toggle/Slide.tsx +++ b/src/components/Toggle/Slide.tsx @@ -31,7 +31,6 @@ const Slide = styled.div` display: inline-block; border-radius: 0.5rem; position: relative; - margin-right: 0.5rem; &::before { content: ''; diff --git a/src/components/Toggle/Toggle.tsx b/src/components/Toggle/Toggle.tsx index d955e2740..34d207977 100644 --- a/src/components/Toggle/Toggle.tsx +++ b/src/components/Toggle/Toggle.tsx @@ -1,4 +1,5 @@ import React, { ComponentPropsWithoutRef, FC, ReactNode, Ref } from 'react'; +import styled from 'styled-components'; import { MarginProps } from 'styled-system'; import { ClassNameProps, extractClassNameProps, extractWrapperMarginProps } from '../../utils/extractProps'; @@ -22,6 +23,11 @@ interface ToggleProps extends ToggleHtmlInputProps, ClassNameProps, MarginProps error?: boolean; } +const SlideWrapper = styled.span` + display: inline-flex; + align-items: center; +`; + const Toggle: FC = props => { const { classNameProps, restProps: withoutClassName } = extractClassNameProps(props); const { marginProps, restProps } = extractWrapperMarginProps(withoutClassName); @@ -34,8 +40,10 @@ const Toggle: FC = props => { return ( );