@scality/core-ui 0.123.0 → 0.125.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  import { IconName } from '../icon/Icon.component';
3
3
  import { CoreUITheme } from '../../style/theme';
4
- type Props = {
4
+ export type Props = {
5
5
  listedResource: {
6
6
  singular: string;
7
7
  plural: string;
8
8
  };
9
9
  icon: IconName;
10
10
  link?: string;
11
- history?: Record<string, any>;
12
11
  backgroundColor?: keyof CoreUITheme;
13
12
  /**
14
13
  * The resource to create before browsing the listed resource
@@ -1 +1 @@
1
- {"version":3,"file":"Emptystate.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/emptystate/Emptystate.component.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,KAAK,KAAK,GAAG;IACX,cAAc,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,WAAW,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAgBF,eAAO,MAAM,aAAa,yGAIzB,CAAC;AACF,eAAO,MAAM,aAAa,yGAGzB,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,KAAK,eAwC/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"Emptystate.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/emptystate/Emptystate.component.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAQ,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,MAAM,KAAK,GAAG;IAClB,cAAc,EAAE;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,WAAW,CAAC;IACpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAgBF,eAAO,MAAM,aAAa,yGAIzB,CAAC;AACF,eAAO,MAAM,aAAa,yGAGzB,CAAC;AAEF,iBAAS,UAAU,CAAC,KAAK,EAAE,KAAK,eAmC/B;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -4,6 +4,7 @@ import { spacing } from '../../spacing';
4
4
  import { Button } from '../buttonv2/Buttonv2.component';
5
5
  import { Icon } from '../icon/Icon.component';
6
6
  import { LargeText } from '../text/Text.component';
7
+ import { useHistory } from 'react-router';
7
8
  const EmptystateContainer = styled.div `
8
9
  ${(props) => {
9
10
  const { theme, backgroundColor } = props;
@@ -29,9 +30,10 @@ export const ActionWrapper = styled.div `
29
30
  justify-content: space-around;
30
31
  `;
31
32
  function EmptyState(props) {
32
- const { icon, listedResource, link, history, resourceToCreate, backgroundColor, } = props;
33
+ const { icon, listedResource, link, resourceToCreate, backgroundColor } = props;
34
+ const history = useHistory();
33
35
  return (_jsxs(EmptystateContainer, { className: "sc-emptystate", backgroundColor: backgroundColor, children: [_jsx(EmptyStateRow, { children: _jsx(Icon, { name: icon, color: "infoPrimary", size: "5x", withWrapper: true }) }), _jsx(EmptyStateRow, { children: _jsx(LargeText, { children: `A list of ${listedResource.plural} will appear here.` }) }), _jsx(EmptyStateRow, { children: _jsx(LargeText, { children: !resourceToCreate
34
36
  ? `There are no ${listedResource.plural} created yet, let's create your first ${listedResource.singular}.`
35
- : `Before browsing your ${listedResource.plural}, create your first ${resourceToCreate}.` }) }), history && (_jsx(ActionWrapper, { children: _jsx(Button, { label: `Create ${resourceToCreate || listedResource.singular}`, icon: _jsx(Icon, { name: "Create-add" }), type: "button", variant: "primary", onClick: () => history.push(link) }) }))] }));
37
+ : `Before browsing your ${listedResource.plural}, create your first ${resourceToCreate}.` }) }), link && (_jsx(ActionWrapper, { children: _jsx(Button, { label: `Create ${resourceToCreate || listedResource.singular}`, icon: _jsx(Icon, { name: "Create-add" }), type: "button", variant: "primary", onClick: () => history.push(link) }) }))] }));
36
38
  }
37
39
  export { EmptyState };
@@ -116,6 +116,9 @@ export declare const iconTable: {
116
116
  Eraser: string;
117
117
  'ID-card': string;
118
118
  Setting: string;
119
+ Desktop: string;
120
+ Globe: string;
121
+ Satellite: string;
119
122
  };
120
123
  export type IconName = keyof typeof iconTable;
121
124
  export type IconColor = keyof CoreUITheme;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/icon/Icon.component.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,aAAa,EAKd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAG7D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmHrB,CAAC;AAaF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC;AAC1C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAiBF,eAAO,MAAM,WAAW;UAAsB,QAAQ;SAiCrD,CAAC;AAkEF,iBAAS,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,eAU7C;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"Icon.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/icon/Icon.component.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,aAAa,EAKd,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAG7D,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsHrB,CAAC;AAaF,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,SAAS,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC;AAC1C,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAiBF,eAAO,MAAM,WAAW;UAAsB,QAAQ;SAiCrD,CAAC;AAkEF,iBAAS,IAAI,CAAC,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,eAU7C;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -119,6 +119,9 @@ export const iconTable = {
119
119
  Eraser: 'fas faEraser',
120
120
  'ID-card': 'fas faIdCard',
121
121
  Setting: 'fas faCog', //TODO: Rename to Gear in FA v6 <i class="fa-sharp fa-solid fa-gear"></i>
122
+ Desktop: 'fas faDesktop',
123
+ Globe: 'fas faGlobe',
124
+ Satellite: 'fas faSatelliteDish',
122
125
  };
123
126
  const IconStyled = styled(FontAwesomeIcon) `
124
127
  ${(props) => {
@@ -12,8 +12,8 @@ export type InputProps = {
12
12
  export declare const Input: import("react").ForwardRefExoticComponent<{
13
13
  error?: string | undefined;
14
14
  id: string;
15
- leftIcon?: "Account" | "Backend" | "Tape" | "Node-backend" | "Volume-backend" | "Node-pdf" | "Volume-pdf" | "Network" | "Bucket" | "Cloud-backend" | "Datacenter" | "Simple-user" | "User" | "Group" | "Alert" | "Bell" | "Lat-menu" | "Dashboard" | "Workflow" | "Expiration" | "Replication" | "Transition" | "Discovery" | "Metrics" | "Edit" | "Logs" | "Lock" | "Lock-open" | "Create-add" | "Delete" | "Save" | "External-link" | "Link" | "Unlink" | "Close" | "Dropdown-down" | "Dropdown-up" | "Search" | "More" | "Info" | "Sync" | "Export" | "Copy" | "Simple-upload" | "Upload" | "Add-plus" | "Minus" | "Remove-minus" | "Sort" | "Sort-up" | "Sort-down" | "Calendar" | "Calendar-minus" | "Arrow-up" | "Arrow-down" | "Arrow-right" | "Arrow-left" | "Arrow-alt-circle-up" | "Folder" | "File" | "File-invoice" | "Deletion-marker" | "Map-marker" | "Location" | "Info-circle" | "Exclamation-triangle" | "Exclamation-circle" | "Exclamation" | "Check" | "Protected" | "Chevron-left" | "Chevron-right" | "Chevron-down" | "Chevron-up" | "Angle-right" | "Angle-double-right" | "Language" | "Theme" | "Documentation" | "Support" | "EULA" | "Log-out" | "Hourglass" | "Pause" | "Pause-circle" | "Play-circle" | "Upgrade" | "Expansion" | "Rebalance" | "Maintenance" | "Role" | "Change-erasure" | "Circle-health" | "Circle-empty" | "Dot-circle" | "Check-circle" | "Times-circle" | "Toolbox" | "Cubes" | "File-alt" | "Policy" | "Pen" | "Pencil" | "Eye" | "EyeSlash" | "Snowflake" | "Key" | "Filter" | "Download" | "Certificate" | "Redo" | "Eraser" | "ID-card" | "Setting" | undefined;
16
- rightIcon?: "Account" | "Backend" | "Tape" | "Node-backend" | "Volume-backend" | "Node-pdf" | "Volume-pdf" | "Network" | "Bucket" | "Cloud-backend" | "Datacenter" | "Simple-user" | "User" | "Group" | "Alert" | "Bell" | "Lat-menu" | "Dashboard" | "Workflow" | "Expiration" | "Replication" | "Transition" | "Discovery" | "Metrics" | "Edit" | "Logs" | "Lock" | "Lock-open" | "Create-add" | "Delete" | "Save" | "External-link" | "Link" | "Unlink" | "Close" | "Dropdown-down" | "Dropdown-up" | "Search" | "More" | "Info" | "Sync" | "Export" | "Copy" | "Simple-upload" | "Upload" | "Add-plus" | "Minus" | "Remove-minus" | "Sort" | "Sort-up" | "Sort-down" | "Calendar" | "Calendar-minus" | "Arrow-up" | "Arrow-down" | "Arrow-right" | "Arrow-left" | "Arrow-alt-circle-up" | "Folder" | "File" | "File-invoice" | "Deletion-marker" | "Map-marker" | "Location" | "Info-circle" | "Exclamation-triangle" | "Exclamation-circle" | "Exclamation" | "Check" | "Protected" | "Chevron-left" | "Chevron-right" | "Chevron-down" | "Chevron-up" | "Angle-right" | "Angle-double-right" | "Language" | "Theme" | "Documentation" | "Support" | "EULA" | "Log-out" | "Hourglass" | "Pause" | "Pause-circle" | "Play-circle" | "Upgrade" | "Expansion" | "Rebalance" | "Maintenance" | "Role" | "Change-erasure" | "Circle-health" | "Circle-empty" | "Dot-circle" | "Check-circle" | "Times-circle" | "Toolbox" | "Cubes" | "File-alt" | "Policy" | "Pen" | "Pencil" | "Eye" | "EyeSlash" | "Snowflake" | "Key" | "Filter" | "Download" | "Certificate" | "Redo" | "Eraser" | "ID-card" | "Setting" | undefined;
15
+ leftIcon?: "Account" | "Backend" | "Tape" | "Node-backend" | "Volume-backend" | "Node-pdf" | "Volume-pdf" | "Network" | "Bucket" | "Cloud-backend" | "Datacenter" | "Simple-user" | "User" | "Group" | "Alert" | "Bell" | "Lat-menu" | "Dashboard" | "Workflow" | "Expiration" | "Replication" | "Transition" | "Discovery" | "Metrics" | "Edit" | "Logs" | "Lock" | "Lock-open" | "Create-add" | "Delete" | "Save" | "External-link" | "Link" | "Unlink" | "Close" | "Dropdown-down" | "Dropdown-up" | "Search" | "More" | "Info" | "Sync" | "Export" | "Copy" | "Simple-upload" | "Upload" | "Add-plus" | "Minus" | "Remove-minus" | "Sort" | "Sort-up" | "Sort-down" | "Calendar" | "Calendar-minus" | "Arrow-up" | "Arrow-down" | "Arrow-right" | "Arrow-left" | "Arrow-alt-circle-up" | "Folder" | "File" | "File-invoice" | "Deletion-marker" | "Map-marker" | "Location" | "Info-circle" | "Exclamation-triangle" | "Exclamation-circle" | "Exclamation" | "Check" | "Protected" | "Chevron-left" | "Chevron-right" | "Chevron-down" | "Chevron-up" | "Angle-right" | "Angle-double-right" | "Language" | "Theme" | "Documentation" | "Support" | "EULA" | "Log-out" | "Hourglass" | "Pause" | "Pause-circle" | "Play-circle" | "Upgrade" | "Expansion" | "Rebalance" | "Maintenance" | "Role" | "Change-erasure" | "Circle-health" | "Circle-empty" | "Dot-circle" | "Check-circle" | "Times-circle" | "Toolbox" | "Cubes" | "File-alt" | "Policy" | "Pen" | "Pencil" | "Eye" | "EyeSlash" | "Snowflake" | "Key" | "Filter" | "Download" | "Certificate" | "Redo" | "Eraser" | "ID-card" | "Setting" | "Desktop" | "Globe" | "Satellite" | undefined;
16
+ rightIcon?: "Account" | "Backend" | "Tape" | "Node-backend" | "Volume-backend" | "Node-pdf" | "Volume-pdf" | "Network" | "Bucket" | "Cloud-backend" | "Datacenter" | "Simple-user" | "User" | "Group" | "Alert" | "Bell" | "Lat-menu" | "Dashboard" | "Workflow" | "Expiration" | "Replication" | "Transition" | "Discovery" | "Metrics" | "Edit" | "Logs" | "Lock" | "Lock-open" | "Create-add" | "Delete" | "Save" | "External-link" | "Link" | "Unlink" | "Close" | "Dropdown-down" | "Dropdown-up" | "Search" | "More" | "Info" | "Sync" | "Export" | "Copy" | "Simple-upload" | "Upload" | "Add-plus" | "Minus" | "Remove-minus" | "Sort" | "Sort-up" | "Sort-down" | "Calendar" | "Calendar-minus" | "Arrow-up" | "Arrow-down" | "Arrow-right" | "Arrow-left" | "Arrow-alt-circle-up" | "Folder" | "File" | "File-invoice" | "Deletion-marker" | "Map-marker" | "Location" | "Info-circle" | "Exclamation-triangle" | "Exclamation-circle" | "Exclamation" | "Check" | "Protected" | "Chevron-left" | "Chevron-right" | "Chevron-down" | "Chevron-up" | "Angle-right" | "Angle-double-right" | "Language" | "Theme" | "Documentation" | "Support" | "EULA" | "Log-out" | "Hourglass" | "Pause" | "Pause-circle" | "Play-circle" | "Upgrade" | "Expansion" | "Rebalance" | "Maintenance" | "Role" | "Change-erasure" | "Circle-health" | "Circle-empty" | "Dot-circle" | "Check-circle" | "Times-circle" | "Toolbox" | "Cubes" | "File-alt" | "Policy" | "Pen" | "Pencil" | "Eye" | "EyeSlash" | "Snowflake" | "Key" | "Filter" | "Download" | "Certificate" | "Redo" | "Eraser" | "ID-card" | "Setting" | "Desktop" | "Globe" | "Satellite" | undefined;
17
17
  size?: InputSize | undefined;
18
18
  } & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & import("react").RefAttributes<HTMLInputElement>>;
19
19
  //# sourceMappingURL=inputv2.d.ts.map
@@ -1,8 +1,9 @@
1
1
  /// <reference types="react" />
2
+ type TextBadgeVariant = 'statusHealthy' | 'statusWarning' | 'statusCritical' | 'infoPrimary' | 'infoSecondary' | 'selectedActive';
2
3
  type Props = {
3
4
  text: string;
4
5
  className?: string;
5
- variant?: 'statusHealthy' | 'statusWarning' | 'statusCritical' | 'infoPrimary' | 'infoSecondary';
6
+ variant?: TextBadgeVariant;
6
7
  };
7
8
  export declare function TextBadge({ text, variant, className, ...rest }: Props): JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"TextBadge.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/textbadge/TextBadge.component.tsx"],"names":[],"mappings":";AAkBA,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EACJ,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,eAAe,CAAC;CACrB,CAAC;AACF,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAuB,EACvB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,eAUP"}
1
+ {"version":3,"file":"TextBadge.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/textbadge/TextBadge.component.tsx"],"names":[],"mappings":";AAIA,KAAK,gBAAgB,GACjB,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,aAAa,GACb,eAAe,GACf,gBAAgB,CAAC;AAerB,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AACF,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,OAAuB,EACvB,SAAS,EACT,GAAG,IAAI,EACR,EAAE,KAAK,eAUP"}
@@ -1,5 +1,4 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- // @ts-nocheck
3
2
  import styled from 'styled-components';
4
3
  import { spacing } from '../../spacing';
5
4
  import { fontWeight } from '../../style/theme';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scality/core-ui",
3
- "version": "0.123.0",
3
+ "version": "0.125.0",
4
4
  "description": "Scality common React component library",
5
5
  "author": "Scality Engineering",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -1,18 +1,18 @@
1
1
  import styled, { css } from 'styled-components';
2
-
3
2
  import { spacing } from '../../spacing';
4
3
  import { Button } from '../buttonv2/Buttonv2.component';
5
4
  import { Icon, IconName } from '../icon/Icon.component';
6
5
  import { LargeText } from '../text/Text.component';
7
6
  import { CoreUITheme } from '../../style/theme';
8
- type Props = {
7
+ import { useHistory } from 'react-router';
8
+
9
+ export type Props = {
9
10
  listedResource: {
10
11
  singular: string;
11
12
  plural: string;
12
13
  };
13
14
  icon: IconName;
14
15
  link?: string;
15
- history?: Record<string, any>;
16
16
  backgroundColor?: keyof CoreUITheme;
17
17
  /**
18
18
  * The resource to create before browsing the listed resource
@@ -46,14 +46,9 @@ export const ActionWrapper = styled.div`
46
46
  `;
47
47
 
48
48
  function EmptyState(props: Props) {
49
- const {
50
- icon,
51
- listedResource,
52
- link,
53
- history,
54
- resourceToCreate,
55
- backgroundColor,
56
- } = props;
49
+ const { icon, listedResource, link, resourceToCreate, backgroundColor } =
50
+ props;
51
+ const history = useHistory();
57
52
  return (
58
53
  <EmptystateContainer
59
54
  className="sc-emptystate"
@@ -72,7 +67,7 @@ function EmptyState(props: Props) {
72
67
  : `Before browsing your ${listedResource.plural}, create your first ${resourceToCreate}.`}
73
68
  </LargeText>
74
69
  </EmptyStateRow>
75
- {history && (
70
+ {link && (
76
71
  <ActionWrapper>
77
72
  <Button
78
73
  label={`Create ${resourceToCreate || listedResource.singular}`}
@@ -128,6 +128,9 @@ export const iconTable = {
128
128
  Eraser: 'fas faEraser',
129
129
  'ID-card': 'fas faIdCard',
130
130
  Setting: 'fas faCog', //TODO: Rename to Gear in FA v6 <i class="fa-sharp fa-solid fa-gear"></i>
131
+ Desktop: 'fas faDesktop',
132
+ Globe: 'fas faGlobe',
133
+ Satellite: 'fas faSatelliteDish',
131
134
  };
132
135
 
133
136
  const IconStyled = styled(FontAwesomeIcon)`
@@ -1,9 +1,16 @@
1
- // @ts-nocheck
2
1
  import styled from 'styled-components';
3
2
  import { spacing } from '../../spacing';
4
3
  import { fontWeight } from '../../style/theme';
5
4
 
6
- const StyledTextBadge = styled.span`
5
+ type TextBadgeVariant =
6
+ | 'statusHealthy'
7
+ | 'statusWarning'
8
+ | 'statusCritical'
9
+ | 'infoPrimary'
10
+ | 'infoSecondary'
11
+ | 'selectedActive';
12
+
13
+ const StyledTextBadge = styled.span<{ variant: TextBadgeVariant }>`
7
14
  ${({ theme, variant }) => `
8
15
  background-color: ${theme[variant]};
9
16
  color: ${
@@ -19,12 +26,7 @@ const StyledTextBadge = styled.span`
19
26
  type Props = {
20
27
  text: string;
21
28
  className?: string;
22
- variant?:
23
- | 'statusHealthy'
24
- | 'statusWarning'
25
- | 'statusCritical'
26
- | 'infoPrimary'
27
- | 'infoSecondary';
29
+ variant?: TextBadgeVariant;
28
30
  };
29
31
  export function TextBadge({
30
32
  text,
@@ -1,21 +1,28 @@
1
- import { EmptyState } from '../src/lib/components/emptystate/Emptystate.component';
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import {
3
+ EmptyState,
4
+ Props,
5
+ } from '../src/lib/components/emptystate/Emptystate.component';
6
+ type Story = StoryObj<Props>;
2
7
 
3
- export default {
8
+ const meta: Meta<Props> = {
4
9
  title: 'Components/Data Display/EmptyState',
5
10
  component: EmptyState,
6
11
  args: {
7
12
  icon: 'Node-backend',
8
- label: 'Node',
13
+ listedResource: {
14
+ singular: 'resource',
15
+ plural: 'resources',
16
+ },
9
17
  },
10
18
  };
11
19
 
12
- export const Default = {};
20
+ export default meta;
21
+
22
+ export const Default: Story = {};
13
23
 
14
- export const WithLink = {
24
+ export const WithLink: Story = {
15
25
  args: {
16
26
  link: '',
17
- history: {
18
- push: () => {},
19
- },
20
27
  },
21
28
  };