Created
September 5, 2024 04:54
-
-
Save ygkn/029e50d9f2d884488386ba616bb3907f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
for file in *.tsx; do | |
cat > "${file%.tsx}.stories.tsx" << EOF | |
import { ${file%.tsx} } from "./${file%.tsx}"; | |
import { Meta, StoryObj } from "@storybook/react"; | |
const meta = { | |
component: ${file%.tsx}, | |
} satisfies Meta<typeof ${file%.tsx}>; | |
export default meta; | |
type Story = StoryObj<typeof meta>; | |
export const Default = {} satisfies Story; | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment