first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
import React from 'react'
|
||||
import styles from './{{ kebabCase name }}.module.css'
|
||||
|
||||
export type {{pascalCase name}}Props = {}
|
||||
|
||||
export function {{pascalCase name}}(props: {{pascalCase name}}Props) {
|
||||
return <div data-testid="{{ kebabCase name }}" className={styles.container}></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 }} } from './{{ kebabCase name }}.component'
|
||||
|
||||
const meta: Meta<typeof {{ pascalCase name }}> = {
|
||||
title: '{{ pascalCase name }}',
|
||||
component: {{ pascalCase name }},
|
||||
argTypes: {},
|
||||
}
|
||||
|
||||
export default meta
|
||||
type Story = StoryObj<typeof {{ pascalCase name }}>
|
||||
|
||||
export const Default: Story = {
|
||||
args: {},
|
||||
async play({ canvasElement }) {
|
||||
const canvas = within(canvasElement)
|
||||
const container = canvas.getByTestId('{{ kebabCase name }}')
|
||||
|
||||
expect(container).toBeTruthy()
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
'use client'
|
||||
|
||||
export * from './{{kebabCase name}}.component'
|
||||
Reference in New Issue
Block a user