Code Monkey home page Code Monkey logo

smarthr-patterns's Introduction

SmartHR Patterns

SmartHR UI を利用した UI パターン集です。通称スマパタ。

Storybook: https://main--62f0ae48c21b0728fd1a5c85.chromatic.com

ディレクトリ構成

.
├── global
│   ├── SomeGlobalComponent
│   │   ├── SomeGlobalComponent.tsx
│   │   └── index.ts         // SomeGlobalComponents の API
│   ├── ..
│   └── index.ts             // @global で使えるコンポーネントたち
├── patterns
│   ├── SomePattern
│   │   ├── SomePattern.mdx  // SomePattern のドキュメントファイル(任意)
│   │   ├── SomePattern.stories.tsx
│   │   ├── SomePattern.tsx
│   │   ├── components
│   │   │   ├── SomeComponent.tsx
│   │   │   └── SomeComponent.stories.tsx
│   │   └── index.ts         // SomePattern の API(任意)
│   ├── ..
│   └── index.ts             // @patterns で使えるコンポーネントたち
├── README.md                // このファイル
└── types                    // 型定義
    ├── ..
    └── some.d.ts

パターンや Story の書き方

基本的には SmartHR UI を組み合わせてパターンとしてください。巨大なコンポーネントを作らないように気をつけましょう。

各ディレクトリの API となる index.ts ファイルは必要なものだけ export しましょう。

export { SomeComponent } from './components/SomeCopmonent'

// 呼び出す側は @patterns で呼び出せます。
// import { SomeComponent } from '@patterns'

同パターン内で呼び出す場合は相対参照しましょう。

import { SomeComponent } from './components'

smarthr-patterns's People

Contributors

uknmr avatar renovate[bot] avatar yamish123 avatar kinoppyd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.