diff --git a/.github/workflows/chromatic.yml b/.github/workflows/chromatic.yml index a951f109..55dbe912 100644 --- a/.github/workflows/chromatic.yml +++ b/.github/workflows/chromatic.yml @@ -14,22 +14,15 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - - run: git fetch origin ${{ github.base_ref }} --depth=1 - - - id: diff - run: echo "::set-output name=changed::$(git diff --name-only origin/${{ github.base_ref }} HEAD --relative ./packages/ui/ | wc -l)" - - name: Install packages uses: ./.github/actions/install-packages - name: Run Chromatic uses: chromaui/action@v1 with: projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} - workingDir: packages/ui + workingDir: ./packages/ui + storybookBaseDir: ./packages/ui exitZeroOnChanges: true onlyChanged: true - diagnostics: true - storybookBaseDir: ./packages/ui env: LOG_LEVEL: 'debug' diff --git a/packages/ui/.storybook/main.js b/packages/ui/.storybook/main.js index f5672881..05ca5dea 100644 --- a/packages/ui/.storybook/main.js +++ b/packages/ui/.storybook/main.js @@ -25,7 +25,10 @@ module.exports = { return mergeConfig(config, { plugins: configType === 'PRODUCTION' - ? [turbosnap({ rootDir: process.cwd() }), svgLoader({ defaultImport: 'component' })] + ? [ + turbosnap({ rootDir: config.root ?? process.cwd() }), + svgLoader({ defaultImport: 'component' }), + ] : [svgLoader({ defaultImport: 'component' })], resolve: { alias: { diff --git a/packages/ui/components/forms/TextAreaField.stories.ts b/packages/ui/components/forms/TextAreaField.stories.ts index 85eea3fb..bbe4aba3 100644 --- a/packages/ui/components/forms/TextAreaField.stories.ts +++ b/packages/ui/components/forms/TextAreaField.stories.ts @@ -64,3 +64,13 @@ export const vModel: Story = { `, }) } + +export const wipDebugTurbosnap: Story = { + name: 'with error message', + args: { + id: 'detail', + name: 'detail', + label: 'お問い合わせ内容/Content', + errorMessage: 'Turbosnap動作確認用', + }, +}