refactor(templates): improve handlebars

This commit is contained in:
Walid 2022-05-16 13:16:19 +01:00
parent 50d732f4cf
commit c04f0ebd36
No known key found for this signature in database
GPG Key ID: 7DF9215FC4E48853
2 changed files with 9 additions and 6 deletions

View File

@ -1,14 +1,17 @@
import classNames from 'classNames' import classNames from 'classnames'
import styles from './{{ properCase name }}.module.scss' import styles from './{{ properCase name }}.module.scss'
interface {{ properCase name }}Props { interface {{ properCase name }}Props {
className?: string className?: string
children?: React.ReactNode children?: string
} }
export const {{ properCase name }}: React.FC<{{ properCase name }}Props> = (props) => { export const {{ properCase name }}: React.FC<{{ properCase name }}Props> = ({
const { className, children } = props className,
children
return <div className={classNames(className, styles.container)}>{children}</div> }) => {
return (
<div className={classNames(className, styles.container)}>{children}</div>
)
} }