-
Notifications
You must be signed in to change notification settings - Fork 8
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 #1114 from peer-42seoul/release-1.0.7
Release 1.0.7
- Loading branch information
Showing
139 changed files
with
5,140 additions
and
1,255 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**/*.storybook.ts | ||
**/*.storybook.tsx | ||
*.d.ts |
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,63 @@ | ||
#!/bin/bash | ||
|
||
# This script is used to refresh the icon storybook | ||
|
||
# Get storybook code | ||
|
||
|
||
# Go to the src directory | ||
cd src | ||
|
||
# Remove the old storybook | ||
rm -rf ./stories/icons && mkdir ./stories/icons | ||
|
||
# Get icons list | ||
icons=$(awk 'BEGIN{ORS="\n"} {print $5}' ./icons/index.ts) | ||
|
||
for icon in $icons | ||
do | ||
echo "Creating story for $icon" | ||
# Create a new story for the icon | ||
echo "import type { Meta, StoryObj } from '@storybook/react' | ||
import { $icon } from '@/icons' | ||
const meta: Meta<typeof $icon> = { | ||
component: $icon, | ||
} | ||
export default meta | ||
type Story = StoryObj<typeof $icon> | ||
export const Default: Story = {}" > "./stories/icons/$icon.stories.tsx" | ||
done | ||
|
||
# Get sub directories | ||
sub_dirs=$(cd ./icons &&ls -dF */ | tr -d '/') | ||
|
||
echo "Sub directories: $sub_dirs" | ||
|
||
for sub_dir in $sub_dirs | ||
do | ||
# Make a new directory for the sub directory | ||
mkdir ./stories/icons/$sub_dir | ||
|
||
# Get icons list | ||
icons=$(awk 'BEGIN{ORS="\n"} {print $5}' ./icons/$sub_dir/index.ts) | ||
|
||
for icon in $icons | ||
do | ||
echo "Creating story for $icon" | ||
# Create a new story for the icon | ||
echo "import type { Meta, StoryObj } from '@storybook/react' | ||
import { $icon } from '@/icons/$sub_dir' | ||
const meta: Meta<typeof $icon> = { | ||
component: $icon, | ||
} | ||
export default meta | ||
type Story = StoryObj<typeof $icon> | ||
export const Default: Story = {}" > "./stories/icons/$sub_dir/$icon.stories.tsx" | ||
done | ||
done |
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
Oops, something went wrong.