-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into kasper/story-names
- Loading branch information
Showing
12 changed files
with
334 additions
and
115 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,34 @@ | ||
name: 'Chromatic' | ||
|
||
on: push | ||
|
||
jobs: | ||
chromatic: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Prepare environment | ||
run: | | ||
pnpm run prisma:setup | ||
env: | ||
DATABASE_URL: ${{ secrets.DATABASE_URL }} | ||
SESSION_KEY: ${{ secrets.SESSION_KEY }} | ||
OAUTH_CLIENT_KEY: ${{ secrets.OAUTH_CLIENT_KEY }} | ||
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }} | ||
|
||
- name: Run Chromatic | ||
uses: chromaui/action@latest | ||
with: | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} |
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 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 { Meta, StoryObj } from '@storybook/react' | ||
import NoteEditor from "./note-editor"; | ||
|
||
const meta = { | ||
component: NoteEditor, | ||
args: { | ||
initialTitle: 'This is a title', | ||
initialBody: 'This is a body', | ||
noteId: '1', | ||
} | ||
} satisfies Meta<typeof NoteEditor> | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta> | ||
export const Default: Story = {} | ||
export const Draft: Story = { | ||
args: { | ||
noteId: undefined, | ||
} | ||
} |
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,11 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import NoteListSkeleton from "./note-list-skeleton"; | ||
|
||
const meta = { | ||
component: NoteListSkeleton, | ||
} satisfies Meta<typeof NoteListSkeleton> | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta> | ||
export const Default: Story = {} |
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,15 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import NotePreview from "./note-preview"; | ||
|
||
const meta = { | ||
component: NotePreview, | ||
} satisfies Meta<typeof NotePreview> | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta> | ||
export const Default: Story = { | ||
args: { | ||
children: "<h3>Some heading</h3>\n<i>italian text</i>" | ||
} | ||
} |
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,11 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import Search from "./search"; | ||
|
||
const meta = { | ||
component: Search, | ||
} satisfies Meta<typeof Search> | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta> | ||
export const Default: Story = {} |
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 @@ | ||
import { Meta, StoryObj } from '@storybook/react' | ||
import Sidebar from "./sidebar"; | ||
import { createNotes } from '#mocks/notes'; | ||
|
||
const meta = { | ||
component: Sidebar, | ||
} satisfies Meta<typeof Sidebar> | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta> | ||
export const Default: Story = { | ||
args: { | ||
notes: createNotes(), | ||
children: null | ||
} | ||
} | ||
export const Empty: Story = { | ||
args: { | ||
notes: [], | ||
children: null | ||
} | ||
} |
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.