Skip to content

Commit

Permalink
Use the Text component for the help text
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 19, 2024
1 parent 988d90f commit 27eafab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 5 additions & 2 deletions packages/components/src/radio-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import BaseControl from '../base-control';
import type { WordPressComponentProps } from '../context';
import type { RadioControlProps } from './types';
import { VStack } from '../v-stack';
import { Text } from '../text';

/**
* Render a user interface to select the user type using radio inputs.
Expand Down Expand Up @@ -105,12 +106,14 @@ export function RadioControl(
{ option.label }
</label>
{ !! option.helpText ? (
<span
<Text
variant="muted"
size={ 12 }
id={ `${ id }-${ index }-help` }
className="components-radio-control__help-text"
>
{ option.helpText }
</span>
</Text>
) : null }
</div>
) ) }
Expand Down
6 changes: 0 additions & 6 deletions packages/components/src/radio-control/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,4 @@
.components-radio-control__help-text {
grid-column: 2;
grid-row: 2;

font-size: $helptext-font-size;
font-style: normal;
font-weight: normal;
line-height: $default-line-height;
color: $components-color-gray-700;
}

0 comments on commit 27eafab

Please sign in to comment.