Skip to content

Commit

Permalink
Tweak spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 24, 2024
1 parent b0b2283 commit 5ecc65e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion packages/components/src/radio-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ export function RadioControl(
help={ help }
className={ clsx( className, 'components-radio-control' ) }
>
<VStack spacing={ 2 }>
<VStack
spacing={ 3 }
className={ clsx(
'components-radio-control__group-wrapper',
!! help &&
'components-radio-control__group-wrapper--with-help'
) }
>
{ options.map( ( option, index ) => (
<div
key={ `${ id }-${ index }` }
Expand Down
8 changes: 6 additions & 2 deletions packages/components/src/radio-control/style.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.components-radio-control__group-wrapper--with-help {
margin-block-end: $grid-unit-15;
}

.components-radio-control__option {
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto minmax(0, max-content);
column-gap: $grid-unit-15;
column-gap: $grid-unit-10;
align-items: center;
}

Expand Down Expand Up @@ -49,7 +53,7 @@
grid-column: 2;
grid-row: 2;

padding-block-start: $grid-unit-10;
padding-block-start: $grid-unit-05;

// Override the top margin of the StyledHelp component from BaseControl.
// TODO: we should tweak the StyledHelp component to not have a top margin.
Expand Down

0 comments on commit 5ecc65e

Please sign in to comment.