Skip to content

Commit

Permalink
Adding gitcoin theme (gitcoinco#33)
Browse files Browse the repository at this point in the history
* adding gitcoin theme

* fixing build
  • Loading branch information
gnomadic authored Nov 14, 2024
1 parent 2a36a60 commit c3dd8d9
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .storybook/GitcoinTheme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from "@storybook/theming";

export default create({
base: "dark",
brandTitle: "Gitcoin UI Kit",
brandUrl: "https://gitcoin.co",
brandImage: "https://ipfs.io/ipfs/QmXuheKdZJwvCrZKF1Py5ez6H3jV9XNtDLTXbPuQknUgzr",
brandTarget: "_self",
});
7 changes: 7 additions & 0 deletions .storybook/Manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { addons } from "@storybook/manager-api";

import GitcoinTheme from "./GitcoinTheme";

addons.setConfig({
theme: GitcoinTheme,
});
5 changes: 5 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const preview: Preview = {
date: /Date$/i,
},
},
options: {
storySort: {
order: ["Welcome", "Features", "Components", "Primitives", "Shadcn", "Styles", "*"],
},
},
},
loaders: [mswLoader],
msw: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
"@storybook/addon-themes": "8.3.5",
"@storybook/blocks": "8.3.5",
"@storybook/builder-vite": "8.3.5",
"@storybook/manager-api": "^8.4.3",
"@storybook/react": "8.3.5",
"@storybook/react-vite": "8.3.5",
"@storybook/test": "8.3.5",
"@storybook/test-runner": "^0.19.1",
"@storybook/theming": "^8.4.3",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
Expand Down
26 changes: 16 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/tokens/colors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, ColorPalette, ColorItem, Title } from "@storybook/blocks";

import { colors } from "./colors";

<Meta title="Examples/Tokens/Colors" />
<Meta title="Styles/Tokens/Colors" />

<Title>Color Palette</Title>

Expand Down
2 changes: 1 addition & 1 deletion src/tokens/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, Title, IconGallery, IconItem } from "@storybook/blocks";

import { icons, Icon } from "@/primitives/Icon";

<Meta title="Examples/Tokens/Icons" />
<Meta title="Styles/Tokens/Icons" />

<Title>Icons</Title>
These are the icons being used in our design system. They are available as React components.
Expand Down
2 changes: 1 addition & 1 deletion src/typography.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta, Typeset } from "@storybook/blocks";

<Meta title="Examples/Typography" />
<Meta title="Styles/Typography" />

MONO

Expand Down
9 changes: 9 additions & 0 deletions src/welcome/welcome.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Meta, Canvas, Story, Description, Controls, Stories } from "@storybook/blocks";

<Meta title="Welcome/Intro" />

# Welcome to the Gitcoin UI Kit.

Gitcoin's UI kit provides a consistent set of styled React components which can be used to build applications with the Allo Protocol and Gitcoin Stack.

This UI kit is maintained by Gitcoin Labs Engineering, and all are welcome to contribute.

0 comments on commit c3dd8d9

Please sign in to comment.