Skip to content

Commit

Permalink
feat(odyssey-react-mui): remove lamp version of Status component
Browse files Browse the repository at this point in the history
  • Loading branch information
bryancunningham-okta committed Dec 11, 2023
1 parent 5b66057 commit 6ff2f9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 54 deletions.
13 changes: 6 additions & 7 deletions packages/odyssey-react-mui/src/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ export type StatusProps = {
* The style of the Status indicator
*/
variant?: (typeof statusVariantValues)[number];
/**
* @deprecated All Statuses are now `pill` variant.
*/
/** **Deprecated:** All Statuses are now `pill` variant */
} & SeleniumProps;

export const Status = ({
label,
severity,
testId,
variant = "lamp",
}: StatusProps) => {
export const Status = ({ label, severity, testId }: StatusProps) => {
const muiProps = useMuiProps();

return (
Expand All @@ -52,7 +51,7 @@ export const Status = ({
color={severity}
data-se={testId}
label={label}
variant={variant}
variant="pill"
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
Status,
StatusProps,
statusSeverityValues,
statusVariantValues,
} from "@okta/odyssey-react-mui";
import { MuiThemeDecorator } from "../../../../.storybook/components";

Expand Down Expand Up @@ -49,23 +48,8 @@ const storybookMeta: Meta<StatusProps> = {
value: "radio",
},
},
variant: {
control: "radio",
options: statusVariantValues,
description:
"Whether the Status is displayed uncontained (`lamp`) or contained (`pill`)",
table: {
type: {
summary: statusVariantValues.join(" | "),
},
defaultValue: {
summary: "lamp",
},
},
},
},
args: {
variant: "lamp",
label: "Warp drive in standby",
severity: "default",
},
Expand All @@ -75,60 +59,29 @@ const storybookMeta: Meta<StatusProps> = {

export default storybookMeta;

export const DefaultLamp: StoryObj<StatusProps> = {
args: {
label: "Warp drive in standby",
},
};

export const ErrorLamp: StoryObj<StatusProps> = {
args: {
label: "Warp drive unstable",
severity: "error",
},
};

export const SuccessLamp: StoryObj<StatusProps> = {
args: {
label: "Warp drive online",
severity: "success",
},
};

export const WarningLamp: StoryObj<StatusProps> = {
args: {
label: "Warp fuel low",
severity: "warning",
},
};

export const DefaultPill: StoryObj<StatusProps> = {
args: {
label: "Warp drive in standby",
variant: "pill",
},
};

export const ErrorPill: StoryObj<StatusProps> = {
args: {
label: "Warp drive unstable",
severity: "error",
variant: "pill",
},
};

export const SuccessPill: StoryObj<StatusProps> = {
args: {
label: "Warp drive online",
severity: "success",
variant: "pill",
},
};

export const WarningPill: StoryObj<StatusProps> = {
args: {
label: "Warp fuel low",
severity: "warning",
variant: "pill",
},
};

0 comments on commit 6ff2f9d

Please sign in to comment.