0.2.33 • Published 2 years ago

@bright-lab/core v0.2.33

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Bright Lab Core contains foundational React UI component libraries for shipping new features faster and it is based on Material UI and will be including some BRIGHT components.

npm downloads minizipped size npm latest package

Installation

@bright-lab/core

@bright-lab/core is available as an npm package.

// with npm
npm install @bright-lab/core

// with yarn
yarn add @bright-lab/core

Note: @bright-lab/core is still in alpha. We are adding new components regularly and updating exisitng ones. You're welcome to contribute!

Getting started with @bright-lab/core

Here is an example of a basic app using @bright-lab/core's Form component:

import * as React from 'react';
import { Form } from '@bright-lab/core';

let fields = [
  {
    id: 'full_name',
    name: 'full_name',
    label: 'Full Name',
    type: 'TextField',
    required: true,
    grid: {
      xs: 12,
      md: 6,
    },
  },
  {
    id: 'image_url',
    name: 'image_url',
    label: 'Image',
    type: 'FileUpload',
    required: true,
    grid: {
      xs: 12,
      md: 6,
    },
  },
  {
    id: 'deactivated',
    name: 'deactivated',
    label: 'Deactivated',
    type: 'RadioGroup',
    required: true,
    grid: {
      xs: 12,
      md: 6,
    },
    data: [
      {
        title: 'Yes',
        value: '0',
      },
      {
        title: 'No',
        value: '1',
      },
    ],
  },
  {
    id: 'company_obj',
    name: 'company_obj',
    label: 'Company',
    type: 'Select',
    required: true,
    grid: {
      xs: 12,
      md: 6,
    },
    data: [
      {
        title: 'Yes',
        value: '0',
      },
      {
        title: 'No',
        value: '1',
      },
    ],
  },
];

function App() {
  return (
    <Form
      fields={fields}
      errorValues={{}}
      handleChange={(values) => console.log('changed', values)}
      defaultValues={{}}
    />
  );
}

Changelog

The changelog is regularly updated to reflect what's changed in each new release.

License

This project is licensed under the terms of the MIT license.

0.2.27

2 years ago

0.2.26

2 years ago

0.2.25

2 years ago

0.2.24

2 years ago

0.2.23

2 years ago

0.2.30

2 years ago

0.2.33

2 years ago

0.2.32

2 years ago

0.2.31

2 years ago

0.2.29

2 years ago

0.2.28

2 years ago

0.2.22

2 years ago

0.2.21

2 years ago

0.2.20

2 years ago

0.2.19

2 years ago

0.2.18

2 years ago

0.2.17

2 years ago

0.2.16

2 years ago

0.2.15

2 years ago

0.2.14

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.15

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.1

2 years ago

0.2.7

2 years ago

0.1.16

2 years ago

0.1.8

2 years ago

0.2.6

2 years ago

0.1.17

2 years ago

0.2.9

2 years ago

0.1.18

2 years ago

0.2.8

2 years ago

0.1.19

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.1.6

2 years ago

0.2.4

2 years ago

0.1.5

2 years ago

0.1.3

2 years ago

0.1.1

2 years ago