3.0.30 • Published 22 days ago

@nokkel/components v3.0.30

Weekly downloads
-
License
MIT
Repository
github
Last release
22 days ago

React Components

A repository for re-usable, React-based components for use across web applications within the Nokkel ecosystem.

Pre-requisites

Contributing

To create a component directory, run `npm run create:component --name="INSERT NAME HERE"

To create an icon, run `npm run create:icon --name="INSERT NAME HERE"

Nokkel components are structured like so:

src/
├── components/
│   └── [Component]/
│       ├── [Component].css
│       ├── [Component].stories.tsx
│       ├── [Component].tsx
│       ├── index.ts
│       └── types.ts
├── context/
│   ├── [context].tsx
│   └── index.ts
├── hooks/
│   ├── [hook].ts
│   └── index.ts
├── icons/
│   ├── [Icon]
|   ├── [Icon].stories.tsx
│   └── index.ts
├── styles/
│   └── global.css
├── sections/
│   └── [Section]/
│       ├── [Section].css
│       ├── [Section].stories.tsx
│       ├── [Section].tsx
│       ├── index.ts
│       └── types.ts
├── utils/
│   ├── [Util].ts
│   └── index.ts
└── index.ts
  • Component.css is where the component classes are stored. We use tailwind styles with the @apply for styles.
    • For brands, use the [data-theme="[brand]"] selector in order to change that specific class for brands.
    • See Button.css for a good example.
  • Component.stories.tsx is where the story for Storybook is stored.
    • Decorators may be used for containers in the case of responsive components.
    • Note: Storybook documentation oftentimes has a type issue with the satisfies Meta<typeof [Component]>. It's suggested to use the same pattern in Button.stories.tsx
    • The first story is used as the top example in Autodocs so it's best to ensure it has all the needed controls (though this can be manually added).
  • Component.tsx contains the actual component.
    • Using a Multi-line comment before the main export will be used by Autodocs in Storybook.
    • Add a data-testid=[component] for testing purposes and identification of component.
    • MaterialUI is used as a base for many components.
    • Button.tsx is a model component.
  • types.ts contains all the types such as props.
    • Comments before each props will be documented in storybook to help design know the fields that can be edited.
  • index.ts exports the component and types. We use this to export the component to the parent folder.
3.0.30

22 days ago

3.0.24

25 days ago

3.0.27

24 days ago

3.0.28

24 days ago

3.0.25

25 days ago

3.0.26

24 days ago

3.0.29

24 days ago

3.0.22

29 days ago

3.0.21

30 days ago

3.0.20

30 days ago

3.0.18

1 month ago

3.0.19

1 month ago

3.0.16

1 month ago

3.0.17

1 month ago

3.0.14

1 month ago

3.0.15

1 month ago

3.0.13

2 months ago

3.0.10

2 months ago

3.0.11

2 months ago

3.0.8

2 months ago

3.0.7

2 months ago

3.0.9

2 months ago

3.0.6

2 months ago

3.0.5

2 months ago

3.0.3

2 months ago

1.1.1

6 months ago

1.0.19

6 months ago

1.1.0

6 months ago

1.0.18

6 months ago

1.0.17

6 months ago

1.0.16

6 months ago

1.1.9

5 months ago

1.1.8

5 months ago

1.0.9

6 months ago

1.1.7

5 months ago

1.0.8

6 months ago

1.1.6

5 months ago

1.0.7

6 months ago

1.1.5

5 months ago

1.0.6

6 months ago

1.1.4

6 months ago

1.0.5

6 months ago

1.1.2

6 months ago

2.0.0-alpha.3

4 months ago

2.0.0-alpha.1

4 months ago

2.0.0-alpha.2

4 months ago

1.1.12

5 months ago

1.1.11

5 months ago

1.1.10

5 months ago

1.0.20

6 months ago

1.1.14

5 months ago

2.0.0

4 months ago

1.1.13

5 months ago

3.0.0

4 months ago

2.1.0-alpha.5

4 months ago

1.0.11

6 months ago

2.1.0-alpha.4

4 months ago

1.0.10

6 months ago

2.1.0-alpha.3

4 months ago

2.1.0-alpha.2

4 months ago

2.1.0-alpha.1

4 months ago

1.0.15

6 months ago

1.0.14

6 months ago

1.0.13

6 months ago

1.0.12

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

7 months ago

1.0.0

7 months ago