1.4.2 • Published 3 years ago

@cohubinc/cohub-ui v1.4.2

Weekly downloads
172
License
MIT
Repository
github
Last release
3 years ago

Storybook Netlify Status

Cohub UI

Sharable UI components for react web apps

Development

Get the app running locally

  1. Clone and cd into the repo
> git clone https://github.com/cohubinc/cohub-ui.git && cd cohub-ui
  1. Install the dependencies
> yarn install
  1. Start the build process

watches for changes in the ./src directory and builds the app bundle into ./dist

> yarn watch

Adding new components or updating existing ones

There are two options for developing components. You can use the Storybook server or the development-playground server to see what your working on in the browser

Components live in ./src/components/

Starting the dev playground server

  1. Move into the development-playground directory and get those dependencies
> cd development-playground
> yarn install
  1. If you haven't already create this file ./development-playgroud/DevSandbox.tsx and export a component. This is what will be rendered to the screen when you start the app.
import * as React from "react";

import { Buttons } from "../dist";

export default function DevSandbox() {
  return <Buttons.FloatingAction icon="arrowDown" />;
}
  1. Start the playground server
> yarn start
  1. Add your new component then import and use it in development-playground/index.tsx

  2. Save the file and after the build completes the browser should update automatically

Adding a Storybook story

Story's are written in MDX and should generally be co-located in the root of the component dir

  1. Add a __stories__ dir to the root of the components folder

  2. Create the *.stories.mdx file. For example: > touch src/components/Avatar/__stories__/Avatar.stories.mdx

  3. Reference the already created stories for examples on how these should be written

  4. Start the build process > yarn watch:stories. (the regular yarn watch will not work)

  5. From the project root start the Storybook server and open the stories in your browser @ http://localhost:6007

    Make sure yarn watch is still running

> yarn storybook
1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.16

3 years ago

1.3.13

3 years ago

1.3.14

3 years ago

1.3.15

3 years ago

1.3.11

4 years ago

1.3.12

4 years ago

1.3.10

4 years ago

1.3.9

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.33

4 years ago

1.0.32

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.85

5 years ago

0.1.84

5 years ago

0.1.83

5 years ago

0.1.82

5 years ago

0.1.81

5 years ago

0.1.80

5 years ago

0.1.79

5 years ago

0.1.78

5 years ago

0.1.77

5 years ago

0.1.76

5 years ago

0.1.75

5 years ago

0.1.74

5 years ago

0.1.73

5 years ago

0.1.72

5 years ago

0.1.71

5 years ago

0.1.70

5 years ago

0.1.69

5 years ago

0.1.68

5 years ago

0.1.67

5 years ago

0.1.66

5 years ago

0.1.65

5 years ago

0.1.64

5 years ago

0.1.63

5 years ago

0.1.62

5 years ago

0.1.61

5 years ago

0.1.60

5 years ago

0.1.59

5 years ago

0.1.58

5 years ago

0.1.57

5 years ago

0.1.56

5 years ago

0.1.55

5 years ago

0.1.54

5 years ago

0.1.53

5 years ago

0.1.52

5 years ago

0.1.51

5 years ago

0.1.50

5 years ago

0.1.49

5 years ago

0.1.48

5 years ago

0.1.47

5 years ago

0.1.46

5 years ago

0.1.45

5 years ago

0.1.44

5 years ago

0.1.43

5 years ago

0.1.42

5 years ago

0.1.41

5 years ago

0.1.40

5 years ago

0.1.39

5 years ago

0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.35

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

5 years ago

0.1.10

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago