feature/storybook #2

Merged
behnam merged 7 commits from feature/storybook into develop 2024-11-26 15:42:17 +00:00
3 changed files with 18 additions and 20 deletions
Showing only changes of commit 2bb8afa51e - Show all commits

View File

@ -8,14 +8,12 @@ import createInvoiceUsecase from "@/feature/core/invoice/domain/usecase/create-i
import type { Meta } from "@storybook/react";
import { useRef } from "react";
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta: Meta = {
title: "general/Button",
};
export default meta;
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Primary: Story = {
argTypes: {
"vm.props.isDisable": {
@ -35,18 +33,18 @@ export const Primary: Story = {
}
};
export const WithVM: Story = {
decorators: [
(Story) => {
return <Story />
}
],
render: () => {
const Child = () => {
const di = useDI();
const vm = useRef(di.resolve(CreateRandomInvoiceButtonVM));
return <Button vm={vm.current} memoizedByVM={false} />
}
return (<DiContext.Provider value={dashboardAppModule()}> <Child /> </ DiContext.Provider>)
}
}
// export const WithVM: Story = {
// decorators: [
// (Story) => {
// return <Story />
// }
// ],
// render: () => {
// const Child = () => {
// const di = useDI();
// const vm = useRef(di.resolve(CreateRandomInvoiceButtonVM));
// return <Button vm={vm.current} memoizedByVM={false} />
// }
// return (<DiContext.Provider value={dashboardAppModule()}> <Child /> </ DiContext.Provider>)
// }
// }

View File

@ -34,7 +34,7 @@ body {
--chart-5: 27 87% 67%;
--radius: 0.5rem;
}
.dark {
:root[class~="dark"] {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
--card: 240 10% 3.9%;