Skip to content

Commit

Permalink
fix: adjust status colors
Browse files Browse the repository at this point in the history
  • Loading branch information
abelflopes committed Jul 21, 2024
1 parent 44c4ebc commit 04001d9
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/components/alert/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
/** Main title of the alert */
heading?: string;
/** Specifies the visual style of the alert */
skin?: "neutral" | "primary" | "negative" | "average" | "positive";
skin?: "neutral" | "primary" | "negative" | "average" | "positive" | "info";
/** Structural variation of the alert */
variation?: "default" | "compact";
/** Close handle, also renders a close icon when defined */
Expand Down
4 changes: 4 additions & 0 deletions packages/components/alert/src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ $alert-styles: (
background-color: theme.get-color(status-positive-light),
color: theme.get-color(status-positive-dark),
),
info: (
background-color: theme.get-color(status-info-light),
color: theme.get-color(status-info-dark),
),
);
2 changes: 1 addition & 1 deletion packages/components/chip/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";

export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement> {
/** Specifies the visual style of the chip */
skin?: "neutral" | "primary" | "negative" | "average" | "positive";
skin?: "neutral" | "primary" | "negative" | "average" | "positive" | "info";
}

/**
Expand Down
6 changes: 5 additions & 1 deletion packages/components/chip/src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ $chip-styles: (
),
positive: (
background-color: get-color(status-positive-light),
color: get-color(status-positive-dark),
color: get-color(status-positive),
),
info: (
background-color: get-color(status-info-light),
color: get-color(status-info),
),
);
9 changes: 3 additions & 6 deletions packages/components/chip/src/styles/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@

.root {
@include text-base;
@include text-variation(small);

display: inline-flex;
padding: 4px 8px;
border-radius: 8px;
padding: get-spacing(0.5) get-spacing();
border-radius: get-spacing(2);
background-color: get-css-var(chip, background-color);
color: get-css-var(chip, color);
// TODO: text variation
font-size: 12px;
font-weight: 700;
line-height: 18px;
white-space: nowrap;
}

Expand Down
3 changes: 3 additions & 0 deletions packages/providers/theme/src/styles/_theme-type.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ $theme-type: (
"status-negative-light",
"status-negative",
"status-negative-dark",
"status-info-light",
"status-info",
"status-info-dark",
"overlay-light",
"overlay-dark",
),
Expand Down
17 changes: 10 additions & 7 deletions packages/providers/theme/src/themes/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,18 @@ export const defaultTheme: Theme = {
"neutral-dark-3": "hsl(230deg 5% 40%)",
"neutral-dark-4": "hsl(230deg 15% 25%)",
"neutral-dark-5": "hsl(230deg 25% 15%)",
"status-positive-light": "#e2f2e3",
"status-positive": "#5ab289",
"status-positive-light": "#E1FCF0",
"status-positive": "#00D891",
"status-positive-dark": "#276749",
"status-average-light": "#feebc8",
"status-average": "#e6c283",
"status-average-light": "#FFEDD5",
"status-average": "#F59E0B",
"status-average-dark": "#9b5c2c",
"status-negative-light": "#fed7d7",
"status-negative": "#ed6d6d",
"status-negative-dark": "#9b2c2c",
"status-negative-light": "#FECACA",
"status-negative": "#EF4444",
"status-negative-dark": "#b71010",
"status-info-light": "#BFDBFE",
"status-info": "#3B82F6",
"status-info-dark": "#0950c3",
"overlay-light": "rgba(255,255,255, .4)",
"overlay-dark": "rgba(0,0,0,.2)",
},
Expand Down
3 changes: 3 additions & 0 deletions packages/providers/theme/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export interface Theme {
"status-negative-light": string;
"status-negative": string;
"status-negative-dark": string;
"status-info-light": string;
"status-info": string;
"status-info-dark": string;
"overlay-light": string;
"overlay-dark": string;
};
Expand Down

0 comments on commit 04001d9

Please sign in to comment.