From 7214f2a6b685117c03b86a0acc916eca9f5e0ae0 Mon Sep 17 00:00:00 2001 From: tkt <37575408+tktcorporation@users.noreply.github.com> Date: Mon, 10 Oct 2022 10:49:07 +0000 Subject: [PATCH] :sparkles `yarn rw g component CommentForm` --- .../CommentForm/CommentForm.stories.tsx | 25 +++++++++++++++++++ .../CommentForm/CommentForm.test.tsx | 14 +++++++++++ .../components/CommentForm/CommentForm.tsx | 10 ++++++++ 3 files changed, 49 insertions(+) create mode 100644 web/src/components/CommentForm/CommentForm.stories.tsx create mode 100644 web/src/components/CommentForm/CommentForm.test.tsx create mode 100644 web/src/components/CommentForm/CommentForm.tsx diff --git a/web/src/components/CommentForm/CommentForm.stories.tsx b/web/src/components/CommentForm/CommentForm.stories.tsx new file mode 100644 index 000000000..8f505528e --- /dev/null +++ b/web/src/components/CommentForm/CommentForm.stories.tsx @@ -0,0 +1,25 @@ +// When you've added props to your component, +// pass Storybook's `args` through this story to control it from the addons panel: +// +// ```tsx +// import type { ComponentStory } from '@storybook/react' +// +// export const generated: ComponentStory = (args) => { +// return +// } +// ``` +// +// See https://storybook.js.org/docs/react/writing-stories/args. + +import type { ComponentMeta } from '@storybook/react' + +import CommentForm from './CommentForm' + +export const generated = () => { + return +} + +export default { + title: 'Components/CommentForm', + component: CommentForm, +} as ComponentMeta diff --git a/web/src/components/CommentForm/CommentForm.test.tsx b/web/src/components/CommentForm/CommentForm.test.tsx new file mode 100644 index 000000000..8ad167b8b --- /dev/null +++ b/web/src/components/CommentForm/CommentForm.test.tsx @@ -0,0 +1,14 @@ +import { render } from '@redwoodjs/testing/web' + +import CommentForm from './CommentForm' + +// Improve this test with help from the Redwood Testing Doc: +// https://redwoodjs.com/docs/testing#testing-components + +describe('CommentForm', () => { + it('renders successfully', () => { + expect(() => { + render() + }).not.toThrow() + }) +}) diff --git a/web/src/components/CommentForm/CommentForm.tsx b/web/src/components/CommentForm/CommentForm.tsx new file mode 100644 index 000000000..d819059ba --- /dev/null +++ b/web/src/components/CommentForm/CommentForm.tsx @@ -0,0 +1,10 @@ +const CommentForm = () => { + return ( +
+

{'CommentForm'}

+

{'Find me in ./web/src/components/CommentForm/CommentForm.tsx'}

+
+ ) +} + +export default CommentForm