-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into gomezivann/breadcrumbs
- Loading branch information
Showing
37 changed files
with
258 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { DxcBadge } from "@dxc-technology/halstack-react"; | ||
|
||
type InfoStatus = { | ||
status: "information"; | ||
label: string; | ||
}; | ||
|
||
type NoInfoStatus = { | ||
status: "deprecated" | "experimental" | "ready" | "required"; | ||
label?: never; | ||
}; | ||
|
||
type Props = InfoStatus | NoInfoStatus; | ||
|
||
const getBadgeColor = (status: Props["status"]) => { | ||
switch (status) { | ||
case "deprecated": | ||
return "yellow"; | ||
case "experimental": | ||
return "purple"; | ||
case "information": | ||
return "blue"; | ||
case "ready": | ||
return "green"; | ||
case "required": | ||
return "orange"; | ||
default: | ||
return "grey"; | ||
} | ||
}; | ||
|
||
const getStatusLabel = (label: Props["label"], status: Props["status"]) => { | ||
return label ? label : status.charAt(0).toUpperCase() + status.slice(1); | ||
}; | ||
|
||
const StatusBadge = ({ label, status }: Props) => ( | ||
<DxcBadge | ||
label={getStatusLabel(label, status)} | ||
color={getBadgeColor(status)} | ||
size="small" | ||
/> | ||
); | ||
|
||
export default StatusBadge; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,74 @@ | ||
exports.componentsList = [ | ||
{ label: "Accordion", path: "/components/accordion", status: "Ready" }, | ||
{ label: "Alert", path: "/components/alert", status: "Ready" }, | ||
{ label: "Accordion", path: "/components/accordion", status: "ready" }, | ||
{ label: "Alert", path: "/components/alert", status: "ready" }, | ||
{ | ||
label: "Application Layout", | ||
path: "/components/application-layout", | ||
status: "Ready", | ||
status: "ready", | ||
}, | ||
{ | ||
label: "Badge", | ||
path: "/components/badge", | ||
status: "Experimental", | ||
status: "experimental", | ||
}, | ||
{ label: "Bleed", path: "/components/bleed", status: "Ready" }, | ||
{ label: "Box", path: "/components/box", status: "Deprecated" }, | ||
{ label: "Bleed", path: "/components/bleed", status: "ready" }, | ||
{ label: "Box", path: "/components/box", status: "deprecated" }, | ||
{ | ||
label: "Bulleted List", | ||
path: "/components/bulleted-list", | ||
status: "Ready", | ||
status: "ready", | ||
}, | ||
{ label: "Button", path: "/components/button", status: "Ready" }, | ||
{ label: "Card", path: "/components/card", status: "Ready" }, | ||
{ label: "Checkbox", path: "/components/checkbox", status: "Ready" }, | ||
{ label: "Chip", path: "/components/chip", status: "Ready" }, | ||
{ label: "Container", path: "/components/container", status: "Experimental" }, | ||
{ label: "Date Input", path: "/components/date-input", status: "Ready" }, | ||
{ label: "Dialog", path: "/components/dialog", status: "Ready" }, | ||
{ label: "Divider", path: "/components/divider", status: "Experimental" }, | ||
{ label: "Dropdown", path: "/components/dropdown", status: "Ready" }, | ||
{ label: "File Input", path: "/components/file-input", status: "Ready" }, | ||
{ label: "Flex", path: "/components/flex", status: "Ready" }, | ||
{ label: "Footer", path: "/components/footer", status: "Ready" }, | ||
{ label: "Grid", path: "/components/grid", status: "Ready" }, | ||
{ label: "Header", path: "/components/header", status: "Ready" }, | ||
{ label: "Heading", path: "/components/heading", status: "Ready" }, | ||
{ label: "Image", path: "/components/image", status: "Experimental" }, | ||
{ label: "Inset", path: "/components/inset", status: "Ready" }, | ||
{ label: "Link", path: "/components/link", status: "Ready" }, | ||
{ label: "Nav Tabs", path: "/components/nav-tabs", status: "Ready" }, | ||
{ label: "Number Input", path: "/components/number-input", status: "Ready" }, | ||
{ label: "Paginator", path: "/components/paginator", status: "Ready" }, | ||
{ label: "Paragraph", path: "/components/paragraph", status: "Ready" }, | ||
{ label: "Button", path: "/components/button", status: "ready" }, | ||
{ label: "Card", path: "/components/card", status: "ready" }, | ||
{ label: "Checkbox", path: "/components/checkbox", status: "ready" }, | ||
{ label: "Chip", path: "/components/chip", status: "ready" }, | ||
{ label: "Container", path: "/components/container", status: "experimental" }, | ||
{ label: "Date Input", path: "/components/date-input", status: "ready" }, | ||
{ label: "Dialog", path: "/components/dialog", status: "ready" }, | ||
{ label: "Divider", path: "/components/divider", status: "experimental" }, | ||
{ label: "Dropdown", path: "/components/dropdown", status: "ready" }, | ||
{ label: "File Input", path: "/components/file-input", status: "ready" }, | ||
{ label: "Flex", path: "/components/flex", status: "ready" }, | ||
{ label: "Footer", path: "/components/footer", status: "ready" }, | ||
{ label: "Grid", path: "/components/grid", status: "ready" }, | ||
{ label: "Header", path: "/components/header", status: "ready" }, | ||
{ label: "Heading", path: "/components/heading", status: "ready" }, | ||
{ label: "Image", path: "/components/image", status: "experimental" }, | ||
{ label: "Inset", path: "/components/inset", status: "ready" }, | ||
{ label: "Link", path: "/components/link", status: "ready" }, | ||
{ label: "Nav Tabs", path: "/components/nav-tabs", status: "ready" }, | ||
{ label: "Number Input", path: "/components/number-input", status: "ready" }, | ||
{ label: "Paginator", path: "/components/paginator", status: "ready" }, | ||
{ label: "Paragraph", path: "/components/paragraph", status: "ready" }, | ||
{ | ||
label: "Password Input", | ||
path: "/components/password-input", | ||
status: "Ready", | ||
status: "ready", | ||
}, | ||
{ label: "Progress Bar", path: "/components/progress-bar", status: "Ready" }, | ||
{ label: "Quick Nav", path: "/components/quick-nav", status: "Ready" }, | ||
{ label: "Radio Group", path: "/components/radio-group", status: "Ready" }, | ||
{ label: "Progress Bar", path: "/components/progress-bar", status: "ready" }, | ||
{ label: "Quick Nav", path: "/components/quick-nav", status: "ready" }, | ||
{ label: "Radio Group", path: "/components/radio-group", status: "ready" }, | ||
{ | ||
label: "Resultset Table", | ||
path: "/components/resultset-table", | ||
status: "Ready", | ||
status: "ready", | ||
}, | ||
{ label: "Select", path: "/components/select", status: "Ready" }, | ||
{ label: "Sidenav", path: "/components/sidenav", status: "Ready" }, | ||
{ label: "Slider", path: "/components/slider", status: "Ready" }, | ||
{ label: "Spinner", path: "/components/spinner", status: "Ready" }, | ||
{ label: "Status Light", path: "/components/status-light", status: "Experimental" }, | ||
{ label: "Switch", path: "/components/switch", status: "Ready" }, | ||
{ label: "Table", path: "/components/table", status: "Ready" }, | ||
{ label: "Tabs", path: "/components/tabs", status: "Ready" }, | ||
{ label: "Tag", path: "/components/tag", status: "Ready" }, | ||
{ label: "Text Input", path: "/components/text-input", status: "Ready" }, | ||
{ label: "Textarea", path: "/components/textarea", status: "Ready" }, | ||
{ label: "Toggle Group", path: "/components/toggle-group", status: "Ready" }, | ||
{ label: "Typography", path: "/components/typography", status: "Ready" }, | ||
{ label: "Wizard", path: "/components/wizard", status: "Ready" }, | ||
{ label: "Select", path: "/components/select", status: "ready" }, | ||
{ label: "Sidenav", path: "/components/sidenav", status: "ready" }, | ||
{ label: "Slider", path: "/components/slider", status: "ready" }, | ||
{ label: "Spinner", path: "/components/spinner", status: "ready" }, | ||
{ | ||
label: "Status Light", | ||
path: "/components/status-light", | ||
status: "experimental", | ||
}, | ||
{ label: "Switch", path: "/components/switch", status: "ready" }, | ||
{ label: "Table", path: "/components/table", status: "ready" }, | ||
{ label: "Tabs", path: "/components/tabs", status: "ready" }, | ||
{ label: "Tag", path: "/components/tag", status: "ready" }, | ||
{ label: "Text Input", path: "/components/text-input", status: "ready" }, | ||
{ label: "Textarea", path: "/components/textarea", status: "ready" }, | ||
{ label: "Toggle Group", path: "/components/toggle-group", status: "ready" }, | ||
{ label: "Typography", path: "/components/typography", status: "ready" }, | ||
{ label: "Wizard", path: "/components/wizard", status: "ready" }, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.