V1 without presentation styling
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import React, { PropsWithChildren } from 'react'
|
||||
import styles from './{{ kebabCase name }}.module.css'
|
||||
|
||||
export type {{pascalCase name}}LayoutProps = PropsWithChildren<{}>
|
||||
|
||||
export function {{pascalCase name}}Layout(props: {{pascalCase name}}LayoutProps) {
|
||||
return <div data-testid="{{ kebabCase name }}-layout" className={styles.container}>{props.children}</div>
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.container {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react'
|
||||
import { expect } from '@storybook/jest'
|
||||
import { within } from '@storybook/testing-library'
|
||||
import { {{ pascalCase name }}Layout } from './{{ kebabCase name }}.layout'
|
||||
|
||||
const meta: Meta<typeof {{ pascalCase name }}Layout> = {
|
||||
title: '{{ pascalCase name }}Layout',
|
||||
component: {{ pascalCase name }}Layout,
|
||||
argTypes: {},
|
||||
}
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof {{ pascalCase name }}Layout>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {},
|
||||
async play({ canvasElement }) {
|
||||
const canvas = within(canvasElement)
|
||||
const container = canvas.getByTestId('{{ kebabCase name }}-layout')
|
||||
|
||||
expect(container).toBeTruthy()
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from './{{kebabCase name}}.layout'
|
||||
Reference in New Issue
Block a user