mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 15:19:08 +03:00
* init FormInput * fix imports * more clean up * Update FormLayout.tsx * Update FormLayout.tsx * adding size prop * more updates * moved things. added checkbox * check in * Update FormLayout.tsx * Select now has a SelectItem * layouts moved * fix type errors * add layout stories * update story * refactored layout to be easier to maintain. dropped the defaultTheme support * update Form * update Badge * remove old code * remove more * more * Update index.tsx * clean up * Update preview.css * fix type errors * Update index.tsx * Update InfoTooltip.tsx * fix issues * add seperator * Update FormLayout.tsx * match styles to old component
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
// import { within, userEvent, expect } from '@storybook/test'
|
|
import { TooltipProvider_Shadcn_ } from 'ui'
|
|
import { Page } from './FormLayout'
|
|
|
|
export default {
|
|
title: 'Form Examples/One',
|
|
component: Page,
|
|
parameters: {
|
|
// More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
|
|
layout: 'centered',
|
|
},
|
|
decorators: [
|
|
(Story: any) => {
|
|
return (
|
|
<TooltipProvider_Shadcn_>
|
|
<Story />
|
|
</TooltipProvider_Shadcn_>
|
|
)
|
|
},
|
|
],
|
|
}
|
|
|
|
export const StateOne = {}
|
|
|
|
// More on interaction testing: https://storybook.js.org/docs/writing-tests/interaction-testing
|
|
// export const LoggedIn = {
|
|
// play: async ({ canvasElement }) => {
|
|
// const canvas = within(canvasElement)
|
|
// const loginButton = canvas.getByRole('button', { name: /Log in/i })
|
|
// await expect(loginButton).toBeInTheDocument()
|
|
// await userEvent.click(loginButton)
|
|
// await expect(loginButton).not.toBeInTheDocument()
|
|
|
|
// const logoutButton = canvas.getByRole('button', { name: /Log out/i })
|
|
// await expect(logoutButton).toBeInTheDocument()
|
|
// },
|
|
// }
|