Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add text-status-warning color to Box #1432

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pages/box/variants.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const permutations = createPermutations<BoxProps>([
'text-status-success',
'text-status-info',
'text-status-inactive',
'text-status-warning',
],
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/__snapshots__/documenter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2323,6 +2323,7 @@ Object {
- \`text-status-success\` - Specifies the color for success text and icons.
- \`text-status-info\` - Specifies the color for info text and icon.
- \`text-status-inactive\` - Specifies the color for inactive and loading text and icons.
- \`text-status-warning\` - Specifies the color for warning text and icons.

Note: If you don't set it, the text color depends on the variant.
",
Expand All @@ -2337,6 +2338,7 @@ Note: If you don't set it, the text color depends on the variant.
"text-status-success",
"text-status-info",
"text-status-inactive",
"text-status-warning",
],
},
"name": "color",
Expand Down
1 change: 1 addition & 0 deletions src/box/__tests__/box.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ describe('Box', () => {
'text-status-success',
'text-status-info',
'text-status-inactive',
'text-status-warning',
],
'color'
);
Expand Down
1 change: 1 addition & 0 deletions src/box/base-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ $font-styles: (
text-status-success: awsui.$color-text-status-success,
text-status-info: awsui.$color-text-status-info,
text-status-inactive: awsui.$color-text-status-inactive,
text-status-warning: awsui.$color-text-status-warning,
inherit: inherit,
),
font-size: (
Expand Down
4 changes: 3 additions & 1 deletion src/box/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export interface BoxProps extends BaseComponentProps {
* - `text-status-success` - Specifies the color for success text and icons.
* - `text-status-info` - Specifies the color for info text and icon.
* - `text-status-inactive` - Specifies the color for inactive and loading text and icons.
* - `text-status-warning` - Specifies the color for warning text and icons.
*
* Note: If you don't set it, the text color depends on the variant.
*/
Expand Down Expand Up @@ -151,7 +152,8 @@ export namespace BoxProps {
| 'text-status-error'
| 'text-status-success'
| 'text-status-info'
| 'text-status-inactive';
| 'text-status-inactive'
| 'text-status-warning';
export type SpacingSize = 'n' | 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
export interface Spacing {
top?: BoxProps.SpacingSize;
Expand Down
Loading