1.1.2 • Published 4 years ago

@mobly/ui-react v1.1.2

Weekly downloads
21
License
ISC
Repository
github
Last release
4 years ago

@mobly/ui-react

Mobly UI react component library.

Install

Install dependencies:

npm i @mobly/ui-react

Usage

This package is built with React, TypeScript and Sass.

It also utilizes the styles from @mobly/ui-styles as Sass modules.
These styles are also exported to easily use in combination with css-in-js libraries.

import React from 'react';
import { Button } from '@mobly/ui-react';

const App = () => {
	return <Button>Click me</Button>;
};

API

  • Box
  • Button
  • Checkbox
  • Datepicker
  • Icon
  • Input
  • Loader
  • Modal
  • Radio
  • Select
  • Switch

Development

Builds are setup with webpack, check the webpack.config.js for more info.
We use storybook for developping our react components.

NPM scripts

CommandDescriptionRuns
startStart up storybookstart-storybook -p 6006 -s ../../storybook/static
buildBuild package contents and typeswebpack && npm run build:types
build:typesBuild typestsc -p tsconfig.build.json
build:storybookBuild storybook styleguidebuild-storybook
lintLint all script and style filesnpm run lint:scripts && npm run lint:styles
lint:scriptsLint scripts (.js,.jsx,.ts,.tsx)eslint --cache --ext .js,.jsx,.ts,.tsx ./src
lint:stylesLint styles (.css,.scss)stylelint ./src/**/*.scss --cache
prepublishOnlyRuns before every npm run publish (!important for lerna)npm run lint && npm run build