forked from geyserfund/geyser-app
-
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 geyserfund#1367 from geyserfund/sajal/gys-6400-sta…
…rt-working-on-storybook Sajal/gys-6400-start-working-on-storybook
- Loading branch information
Showing
15 changed files
with
3,870 additions
and
73 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
push: | ||
branches: | ||
- "staging" # change to the branch you wish to deploy from | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.build-publish.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: build-publish | ||
uses: bitovi/[email protected] | ||
with: | ||
path: build # change to your build folder | ||
install_command: yarn install | ||
build_command: yarn storybook:build |
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 @@ | ||
18.19.1 |
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,21 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite' | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../**/*.mdx', '../**/*.stories.@(js|jsx|mjs|ts|tsx)'], | ||
addons: [ | ||
'@chakra-ui/storybook-addon', | ||
'@storybook/addon-onboarding', | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
'@chromatic-com/storybook', | ||
'@storybook/addon-interactions', | ||
], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: 'tag', | ||
}, | ||
} | ||
export default config |
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,21 @@ | ||
import type { Preview } from '@storybook/react' | ||
import {theme} from '../src/config/theme/theme' | ||
import { lightModeColors } from '../src/styles' | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
layout: 'centered', | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
chakra: { | ||
theme: {...theme, colors: lightModeColors}, | ||
} | ||
|
||
}, | ||
} | ||
|
||
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
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,53 @@ | ||
import { BellIcon } from '@chakra-ui/icons' | ||
import { Button as ChakraButton } from '@chakra-ui/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
const meta = { | ||
title: 'Components/Input/Button', | ||
component: ChakraButton, | ||
tags: ['autodocs'], | ||
args: { | ||
children: 'Button', | ||
}, | ||
argTypes: { | ||
variant: { | ||
options: [ | ||
'primary', | ||
'primaryNeutral', | ||
'primaryLink', | ||
'primaryGradient', | ||
'secondary', | ||
'secondaryNeutral', | ||
'transparent', | ||
], | ||
control: { type: 'select' }, | ||
}, | ||
size: { | ||
options: ['sm', 'md', 'lg'], | ||
control: { type: 'radio' }, | ||
}, | ||
}, | ||
} satisfies Meta<typeof ChakraButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const SimpleButton: Story = { | ||
args: { | ||
variant: 'primary', | ||
}, | ||
} | ||
|
||
export const LeftIconButton: Story = { | ||
args: { | ||
variant: 'primary', | ||
leftIcon: <BellIcon />, | ||
}, | ||
} | ||
|
||
export const RightIconButton: Story = { | ||
args: { | ||
variant: 'primary', | ||
rightIcon: <BellIcon />, | ||
}, | ||
} |
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,42 @@ | ||
import { BellIcon } from '@chakra-ui/icons' | ||
import { IconButton as ChakraButton } from '@chakra-ui/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
const meta = { | ||
title: 'Components/Input/IconButton', | ||
component: ChakraButton, | ||
tags: ['autodocs'], | ||
args: { | ||
icon: <BellIcon />, | ||
}, | ||
argTypes: { | ||
size: { | ||
options: ['sm', 'md', 'lg'], | ||
control: { type: 'radio' }, | ||
}, | ||
}, | ||
} satisfies Meta<typeof ChakraButton> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const IconButton: Story = { | ||
args: { | ||
variant: 'primary', | ||
'aria-label': 'Notification', | ||
}, | ||
argTypes: { | ||
variant: { | ||
options: [ | ||
'primary', | ||
'primaryNeutral', | ||
'primaryLink', | ||
'primaryGradient', | ||
'secondary', | ||
'secondaryNeutral', | ||
'transparent', | ||
], | ||
control: { type: 'select' }, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.