Skip to content

Commit 3009e97

Browse files
committed
chore: Registers radio button style tokens where the control is painted
1 parent ec99124 commit 3009e97

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/internal/components/radio-button/styles.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ $radio-size: awsui.$size-control;
1414

1515
$_control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
1616
$_control-tokens: style-api.resolve($_control-props, carrier);
17+
// Registered here, next to the carrier, so every component that renders this control loads the registration.
18+
@include style-api.register($_control-tokens);
1719

1820
.radio-control {
1921
@include style-api.carriers($_control-tokens);

‎src/radio-button/styles.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
@use '../internal/styles' as styles;
77
@use '../internal/styles/style-api' as style-api;
88

9-
// The control slot is painted by the shared internal radio button, which reads the same token map.
9+
// The control slot is painted by the shared internal radio button, which reads the same token map and registers it.
1010
$control-props: style-api.combine((fill-color, border-color, indicator-color), style-api.$focus-ring);
1111
$control-tokens: style-api.resolve($control-props, carrier);
12-
@include style-api.register($control-tokens);
1312
@include style-api.docs('control', $control-tokens);
1413

1514
.radio-button {

0 commit comments

Comments
 (0)