From c04f0ebd366c0ec80c7e769f2365257a0b3457a2 Mon Sep 17 00:00:00 2001 From: Walidoux Date: Mon, 16 May 2022 13:16:19 +0100 Subject: [PATCH] refactor(templates): improve handlebars --- ....module.scss.hbs => Component.module.scss.hbs} | 0 templates/Component/Component.tsx.hbs | 15 +++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) rename templates/Component/{component.module.scss.hbs => Component.module.scss.hbs} (100%) diff --git a/templates/Component/component.module.scss.hbs b/templates/Component/Component.module.scss.hbs similarity index 100% rename from templates/Component/component.module.scss.hbs rename to templates/Component/Component.module.scss.hbs diff --git a/templates/Component/Component.tsx.hbs b/templates/Component/Component.tsx.hbs index 0e62b64..dfd8293 100644 --- a/templates/Component/Component.tsx.hbs +++ b/templates/Component/Component.tsx.hbs @@ -1,14 +1,17 @@ -import classNames from 'classNames' +import classNames from 'classnames' import styles from './{{ properCase name }}.module.scss' interface {{ properCase name }}Props { className?: string - children?: React.ReactNode + children?: string } -export const {{ properCase name }}: React.FC<{{ properCase name }}Props> = (props) => { - const { className, children } = props - - return
{children}
+export const {{ properCase name }}: React.FC<{{ properCase name }}Props> = ({ + className, + children +}) => { + return ( +
{children}
+ ) }