Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.
/ sakina-react Public archive

React new typescript component file template code generator

License

Notifications You must be signed in to change notification settings

xn-sakina/sakina-react

Repository files navigation

sakina-react

React new typescript component file template code generator.

Install

  pnpm add -g sakina-react

Usage

Simple component

such as project files tree:

 └─ project
    └─ src
       └─ components # (in this dir exec command)

in project/src/components exec:

  sr gs AnimeList

then generate a simple react component file:

 └─ project
    └─ src
       └─ components
          └─ AnimeList.tsx
// AnimeList.tsx
import React from 'react'

export interface IAnimeListProps {}

export const AnimeList: React.FC<IAnimeListProps> = (props) => {
  return (
    <div>content</div>
  )
}

With style component

such as:

  sr g AnimeList

then generate a component with style file:

 └─ project
    └─ src
       └─ components
          └─ AnimeList
             ├─ index.tsx
             └─ index.module.scss

License

MIT

About

React new typescript component file template code generator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published