-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 #13347 from TylerAPfledderer/feat/shadcn-extend-in…
…itialization feat: extend ShadCN initialization
- Loading branch information
Showing
24 changed files
with
962 additions
and
488 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,2 @@ | ||
<style type="text/css"> | ||
|
||
:root { | ||
--font-inter: 'Inter', sans-serif; | ||
} | ||
|
||
</style> | ||
|
||
<link rel="preload" href="/fonts/inter/latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" /> |
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 |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import isChromatic from "chromatic/isChromatic" | ||
import { MotionGlobalConfig } from "framer-motion" | ||
import { withThemeByDataAttribute } from "@storybook/addon-themes" | ||
import type { Preview } from "@storybook/react" | ||
|
||
import ThemeProvider from "@/components/ThemeProvider" | ||
|
||
import i18n, { baseLocales } from "./i18next" | ||
|
||
import "../src/styles/global.css" | ||
import "../src/styles/fonts.css" | ||
|
||
MotionGlobalConfig.skipAnimations = isChromatic() | ||
|
||
export const breakpointSet: [token: string, value: string][] = [ | ||
["base", "375px"], | ||
["sm", "640px"], | ||
["md", "768px"], | ||
["lg", "1024px"], | ||
["xl", "1280px"], | ||
["2xl", "1536px"], | ||
] | ||
|
||
const preview: Preview = { | ||
globals: { | ||
locale: "en", | ||
locales: baseLocales, | ||
}, | ||
decorators: [ | ||
withThemeByDataAttribute({ | ||
themes: { | ||
light: "light", | ||
dark: "dark", | ||
}, | ||
defaultTheme: "light", | ||
}), | ||
(Story) => ( | ||
<ThemeProvider> | ||
<Story /> | ||
</ThemeProvider> | ||
), | ||
], | ||
parameters: { | ||
i18n, | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
chromatic: { | ||
prefersReducedMotion: "reduce", | ||
}, | ||
options: { | ||
storySort: { | ||
order: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"], | ||
}, | ||
}, | ||
layout: "centered", | ||
// Modify viewport selection to match Chakra breakpoints (or custom breakpoints) | ||
viewport: { | ||
viewports: breakpointSet.reduce<{ | ||
[token: string]: { | ||
name: string | ||
styles: Record<"width" | "height", string> | ||
} | ||
}>((arr, [token, value]) => { | ||
return { | ||
...arr, | ||
[token]: { | ||
name: token, | ||
styles: { | ||
width: value, | ||
height: "800px", | ||
}, | ||
}, | ||
} | ||
}, {}), | ||
}, | ||
}, | ||
} | ||
|
||
export default preview |
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 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
Oops, something went wrong.