Skip to content

Commit

Permalink
Change approach to maintaining spacing of control and help text
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Nov 12, 2021
1 parent 49b5f03 commit 9f9c022
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/components/src/tools-panel/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { css } from '@emotion/react';
*/
import {
StyledField as BaseControlField,
StyledHelp as BaseControlHelp,
Wrapper as BaseControlWrapper,
} from '../base-control/styles/base-control-styles';
import { COLORS, CONFIG } from '../utils';
Expand Down Expand Up @@ -102,16 +103,15 @@ export const ToolsPanelItem = css`
/* Remove BaseControl components margins and leave spacing to grid layout */
&& ${ BaseControlWrapper } {
margin-bottom: 0;
/* The following allows controls with help text to maintain spacing. */
/* e.g. ToggleControls. */
display: flex;
flex-direction: column;
row-gap: ${ space( 3 ) };
${ BaseControlField } {
${ BaseControlField }:last-child {
margin-bottom: 0;
}
}
${ BaseControlHelp } {
margin-bottom: 0;
}
`;

export const ToolsPanelItemPlaceholder = css`
Expand Down

0 comments on commit 9f9c022

Please sign in to comment.