Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Add a script to make components
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Apr 13, 2022
1 parent 829f6c2 commit f364f33
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions scripts/cmp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

name=$1

mkdir -p "$name"

cat << EOF > "$name/styles.module.css"
.container {
}
EOF

cat << EOF > "$name/index.tsx"
import { ReactElement } from 'react'
import css from './styles.module.css'
const ${name} = (): ReactElement => {
return (
<div className={css.container}>
</div>
)
}
export default ${name}
EOF

0 comments on commit f364f33

Please sign in to comment.