Rename policy into document
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
1870e050ce
commit
b6aec0b14a
@@ -0,0 +1,21 @@
|
||||
import { DocumentVersionBadge } from "./DocumentVersionBadge";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
export default {
|
||||
title: "Molecules/Badges/DocumentVersionBadge",
|
||||
component: DocumentVersionBadge,
|
||||
argTypes: {},
|
||||
} satisfies Meta<typeof DocumentVersionBadge>;
|
||||
|
||||
type Story = StoryObj<typeof DocumentVersionBadge>;
|
||||
|
||||
export const Default: Story = {
|
||||
render() {
|
||||
return (
|
||||
<div className="flex gap-2">
|
||||
<DocumentVersionBadge state="DRAFT" />
|
||||
<DocumentVersionBadge state="PUBLISHED" />
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -5,7 +5,7 @@ type Props = {
|
||||
state: "DRAFT" | "PUBLISHED";
|
||||
};
|
||||
|
||||
export function PolicyVersionBadge(props: Props) {
|
||||
export function DocumentVersionBadge(props: Props) {
|
||||
const { __ } = useTranslate();
|
||||
return (
|
||||
<Badge variant={props.state === "DRAFT" ? "neutral" : "success"}>
|
||||
@@ -1,21 +0,0 @@
|
||||
import { PolicyVersionBadge } from "./PolicyVersionBadge";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
export default {
|
||||
title: "Molecules/Badges/PolicyVersionBadge",
|
||||
component: PolicyVersionBadge,
|
||||
argTypes: {},
|
||||
} satisfies Meta<typeof PolicyVersionBadge>;
|
||||
|
||||
type Story = StoryObj<typeof PolicyVersionBadge>;
|
||||
|
||||
export const Default: Story = {
|
||||
render() {
|
||||
return (
|
||||
<div className="flex gap-2">
|
||||
<PolicyVersionBadge state="DRAFT" />
|
||||
<PolicyVersionBadge state="PUBLISHED" />
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -52,7 +52,7 @@ export {
|
||||
export { useConfirm } from "./Molecules/Dialog/ConfirmDialog";
|
||||
export { RiskBadge } from "./Molecules/Badge/RiskBadge";
|
||||
export { SeverityBadge } from "./Molecules/Badge/SeverityBadge.tsx";
|
||||
export { PolicyVersionBadge } from "./Molecules/Badge/PolicyVersionBadge.tsx";
|
||||
export { DocumentVersionBadge } from "./Molecules/Badge/DocumentVersionBadge.tsx";
|
||||
export { RisksChart } from "./Molecules/Risks/RisksChart";
|
||||
export { RiskOverview } from "./Molecules/Risks/RiskOverview";
|
||||
export { Combobox, ComboboxItem } from "./Molecules/Combobox/Combobox";
|
||||
|
||||
Reference in New Issue
Block a user