diff --git a/packages/fuselage/.loki/reference/chrome_iphone7_States_States_Variations.png b/packages/fuselage/.loki/reference/chrome_iphone7_States_States_Variations.png new file mode 100644 index 0000000000..ac8edf63ce Binary files /dev/null and b/packages/fuselage/.loki/reference/chrome_iphone7_States_States_Variations.png differ diff --git a/packages/fuselage/.loki/reference/chrome_laptop_States_States_Action_Button_With_No_Suggestions.png b/packages/fuselage/.loki/reference/chrome_laptop_States_States_Action_Button_With_No_Suggestions.png index c3467e41f9..a77c663a3a 100644 Binary files a/packages/fuselage/.loki/reference/chrome_laptop_States_States_Action_Button_With_No_Suggestions.png and b/packages/fuselage/.loki/reference/chrome_laptop_States_States_Action_Button_With_No_Suggestions.png differ diff --git a/packages/fuselage/.loki/reference/chrome_laptop_States_States_Variations.png b/packages/fuselage/.loki/reference/chrome_laptop_States_States_Variations.png new file mode 100644 index 0000000000..5850551fd3 Binary files /dev/null and b/packages/fuselage/.loki/reference/chrome_laptop_States_States_Variations.png differ diff --git a/packages/fuselage/src/components/States/States.stories.tsx b/packages/fuselage/src/components/States/States.stories.tsx index 3e7f7085b9..26c8dc63df 100644 --- a/packages/fuselage/src/components/States/States.stories.tsx +++ b/packages/fuselage/src/components/States/States.stories.tsx @@ -12,7 +12,7 @@ import { StatesActions, StatesAction, } from '.'; -import { Box } from '..'; +import { Box, Icon } from '..'; export default { title: 'States/States', @@ -77,6 +77,7 @@ export const ActionButton = () => ( ); + export const ActionButtonWithNoSuggestions = () => ( @@ -92,3 +93,76 @@ export const ActionButtonWithNoSuggestions = () => ( ); + +export const Variations = () => ( + + + + Connection error + + Cannot connect to internet or your workspace may be an offline install.{' '} +
Contact your workspace admin for more information. +
+ + + Reload + + +
+ + + + Connection error + + Cannot connect to internet or your workspace may be an offline install.{' '} +
Contact your workspace admin for more information. +
+ + + Reload + + +
+ + + Connection error + + Cannot connect to internet or your workspace may be an offline install.{' '} +
Contact your workspace admin for more information. +
+ + + Reload + + +
+ + + + Connection error + + Cannot connect to internet or your workspace may be an offline install.{' '} +
Contact your workspace admin for more information. +
+ + + Reload + + +
+ + + + Connection error + + Cannot connect to internet or your workspace may be an offline install.{' '} +
Contact your workspace admin for more information. +
+ + + Reload + + +
+
+); diff --git a/packages/fuselage/src/components/States/States.styles.scss b/packages/fuselage/src/components/States/States.styles.scss index 8bf528d725..6154312910 100644 --- a/packages/fuselage/src/components/States/States.styles.scss +++ b/packages/fuselage/src/components/States/States.styles.scss @@ -3,6 +3,13 @@ @use '../../styles/colors.scss'; @use '../../styles/typography.scss'; +$variants: ( + 'success': colors.success(600), + 'danger': colors.danger(600), + 'warning': colors.warning(600), + 'primary': colors.primary(600), +); + .rcx-states { display: flex; flex-direction: column; @@ -17,9 +24,17 @@ margin-block-end: lengths.margin(16); padding: lengths.margin(16); + color: colors.foreground(info); + border-radius: 100%; background-color: colors.neutral(200); + + @each $name, $color in $variants { + &--#{$name} { + color: theme('states-icons-color-#{$name}', $color); + } + } } &__title { @@ -40,7 +55,7 @@ align-items: center; width: 100%; - max-width: 410px; + max-width: 462px; margin: 0; padding: 0; diff --git a/packages/fuselage/src/components/States/StatesIcon.tsx b/packages/fuselage/src/components/States/StatesIcon.tsx index 16d17a08c1..647ebf7b0c 100644 --- a/packages/fuselage/src/components/States/StatesIcon.tsx +++ b/packages/fuselage/src/components/States/StatesIcon.tsx @@ -4,11 +4,14 @@ import { Icon } from '../Icon'; const StatesIcon: FC<{ name: ComponentProps['name']; - // variation?: 'danger'; -}> = ({ name }) => ( -
- -
+ variation?: 'danger' | 'success' | 'warning' | 'primary'; +}> = ({ name, variation }) => ( + ); export default StatesIcon;