-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from allaboutapps/dev
Dev
- Loading branch information
Showing
13 changed files
with
295 additions
and
243 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { SiteContainer } from "@/components/ui/SiteContainer"; | ||
import { tServer } from "@/i18n/util"; | ||
import { useGeneralStore } from "@/stores/generalStore"; | ||
import { sleep } from "@/util/helpers"; | ||
import { Button } from "@mui/material"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { LoadingOverlay } from "./LoadingOverlay"; | ||
|
||
export default { | ||
title: "Loading Overlay", | ||
} satisfies Meta; | ||
|
||
export const TriggerOverlay: StoryObj = { | ||
render: () => { | ||
const [setIsLoading] = useGeneralStore((state) => [state.setIsLoading]); | ||
|
||
return ( | ||
<SiteContainer> | ||
<Button | ||
variant="outlined" | ||
onClick={async () => { | ||
setIsLoading(true); | ||
await sleep(100); | ||
setIsLoading(false); | ||
}} | ||
> | ||
{tServer("de", "button.loadingShort")} | ||
</Button> | ||
<Button | ||
variant="outlined" | ||
onClick={async () => { | ||
setIsLoading(true); | ||
await sleep(2000); | ||
setIsLoading(false); | ||
}} | ||
> | ||
{tServer("de", "button.loadingLong")} | ||
</Button> | ||
<LoadingOverlay /> | ||
</SiteContainer> | ||
); | ||
}, | ||
}; |
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,30 @@ | ||
import { SiteContainer } from "@/components/ui/SiteContainer"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
|
||
export default { | ||
title: "Text Styles", | ||
} satisfies Meta; | ||
|
||
export const Headlines: StoryObj = { | ||
render: () => { | ||
return ( | ||
<SiteContainer> | ||
<h1 className="text-primary">H1 headline</h1> | ||
<h2>H2 headline</h2> | ||
<h3>H3 headline</h3> | ||
<h4>H4 headline</h4> | ||
</SiteContainer> | ||
); | ||
}, | ||
}; | ||
|
||
export const Paragraphs: StoryObj = { | ||
render: () => { | ||
return ( | ||
<SiteContainer> | ||
<p>Paragraph body1</p> | ||
<p className="body2">Paragraph body2</p> | ||
</SiteContainer> | ||
); | ||
}, | ||
}; |
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,24 @@ | ||
import { SiteContainer } from "@/components/ui/SiteContainer"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
import { Colors as C } from "./colors"; | ||
|
||
export default { | ||
title: "Colors", | ||
} satisfies Meta; | ||
|
||
export const ColorPalette: StoryObj = { | ||
render: () => { | ||
return ( | ||
<SiteContainer> | ||
<div className="flex flex-col gap-4"> | ||
{Object.entries(C).map((entry) => ( | ||
<div key={entry[0]} className="flex justify-between"> | ||
{`${entry[0]}: `} | ||
<div style={{ marginLeft: 16, width: 100, height: 32, backgroundColor: entry[1] }} /> | ||
</div> | ||
))} | ||
</div> | ||
</SiteContainer> | ||
); | ||
}, | ||
}; |
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.