0.11.0 • Published 5 years ago

@zeelo/feui v0.11.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

FE UI

Getting Started

FE UI is a library we are using to develop and use atomic component like InputText and Button.

Proping and styling

We are using a Classify service of our own where all the incoming props and their values are treated the same way. Every component use this service to have common classes depending on their props and most of the components accept same props and values.

Hence we need to implement the classes extracted from the Classify service in order to give the components the same styling options.

For example: color="primary". This prop is taken into Classify service and the service returns us the zlo--primary class. Then we need to implement this class in every component so we can give thac class to that component.

Example: color="primary" to both InputText and Button. InputText will implement that class for coloring the borders and the text inside and the Button will implement that class for the background color and the hovering/active/focus colors.

And the same way for all the components and all the props.

NOTE: We might not want some classes to be implemented for some components - and that's perfectly acceptable - but then we won't be able to use them even having the prop/value/class being used in the component since it has no implementation.

Storybook

Yeah, that's it. Storybook is the place where we can use and test our atomic components.

Stories

Every component must be tested under its own Story. That said we need to create a new storiesOf() and add the component under it. For example storiesOf('Zeelo/Btn') creates a new entry Btn under Zeelo. Every component entry must be under Zeelo entry.

And then under Btn we can create as many entries as we desire using add() method, for instance add('Basic') and then we can use our component inside.

Knobs

Knobs is a Storybook plugin that allow us to change a component's props in a live way so we can test all the possibilities a component has.

Run

To run storybook we first need to install everything with npm i and then get the build. Once we have the build, run npm run storybook. If you want to develop and see the storybook updated at the same time, run npm start in a tab and the npm run storybook in a different tab. command. Oh, of course, go to http://localhost:6006.

Scripts

Start

  • npm run start or npm start: Installs everything and launches webpack in dev mode.
  • npm run start:fresh: Removes node_modules and public folder and then runs npm start. This is mainly used for when changing some dependencies.

Webpack

  • npm run webpack:dev: Launches webpack in dev mode - watch and dev build. Use this one for dev mode when you don't need to install nor check dependencies.
  • npm run webpack:prod: Launches webpack in prod mode - production build.

Build

  • npm run build: Removes node_modules and public folder and then runs npm run webpack:prod for a fresh build production.

Tests

  • npm test or npm run test: Runs Jest testing.
0.11.0

5 years ago

0.10.3

5 years ago

0.10.2

5 years ago

0.10.1

5 years ago

0.10.0

5 years ago

0.9.9

5 years ago

0.9.8

5 years ago

0.9.7

5 years ago

0.9.6

6 years ago

0.9.5

6 years ago

0.9.4

6 years ago

0.9.3

6 years ago

0.9.2

6 years ago

0.9.1

6 years ago

0.9.0

6 years ago

0.8.3

6 years ago

0.8.2

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago

0.7.8

6 years ago

0.7.7

6 years ago

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.22

6 years ago

0.6.21

6 years ago

0.6.20

6 years ago

0.6.19

6 years ago

0.6.18

6 years ago

0.6.17

6 years ago

0.6.16

6 years ago

0.6.15

6 years ago

0.6.14

6 years ago

0.6.13

6 years ago

0.6.12

6 years ago

0.6.11

6 years ago

0.6.10

6 years ago

0.6.9

6 years ago

0.6.8

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.19

6 years ago

0.4.18

6 years ago

0.4.17

6 years ago

0.4.16

6 years ago

0.4.15

6 years ago

0.4.14

6 years ago

0.4.13

6 years ago

0.4.12

6 years ago

0.4.11

6 years ago

0.4.10

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago