Socket
Socket
Sign inDemoInstall

@cobuildlab/boost

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cobuildlab/boost

[![Build Status](https://travis-ci.org/8base/boost.svg?branch=master)](https://travis-ci.org/8base/boost)


Version published
Weekly downloads
4
decreased by-63.64%
Maintainers
3
Weekly downloads
 
Created
Source

Build Status

8base UI Kit

Storybook - https://8base.github.io/boost/

Start local

yarn storybook

Usage

Basic usage

import { BoostProvider, Button } from '@8base/boost';

const App = () => {
  return (
    <BoostProvider>
      ...
      <Button>Some Text</Button>
    </BoostProvider>
  )
}

Usage with custom theme

import { BoostProvider, createTheme } from '@8base/boost';


const customTheme = createTheme({
  /** Change the pallete of the color. */
  COLORS: {
    PRIMARY: '#3EB7F9',
    PRIMARY_TEXT_COLOR: 'darkorange',
    SECONDARY_TEXT_COLOR: 'orange',
  },
  /** Change the custom components styles if it needed. */
  components: {
    input: {
      root: {
        borderColor: 'gray',
      },
      modifiers: {
        hasError: {
          borderColor: 'red',
        }
      }
    },
    button: ({ COLORS, SIZES }) => ({
      root: {
        fontSize: SIZES.OVERLINE_1,
      },
      modifiers: {
        disabled: {
          backgroundColor: COLORS.RED,
        },
      },
    }),
  },
});


const App = () => {
  return (
    <BoostProvider theme={ customTheme }>
      ...
    </BoostProvider>
  )
}

Icons

Extends icons pack

To expand icons pack you should add babel-plugin-inline-react-svg or describe svg components manual.

import { BoostProvider, createTheme } from '@8base/boost';

import SomeSvgIcon from './some-svg-icon.svg';
import AnotherSvgIcon from './another-svg-icon.svg';

const icons = {
  SomeSvgIcon,
  AnotherSvgIcon,
}

const App = () => {
  return (
    <BoostProvider icons={ icons }>
      ...
      <Icon name="AnotherSvgIcon" size="lg" color="RED" />
    </BoostProvider>
  )
}

Using with fontawesome

At the first you need to add install awesome font to the index.html as described in the fontawesome docs.

import { BoostProvider, createTheme } from '@8base/boost';

const App = () => {
  return (
    <BoostProvider>
      ...
      <Icon className="fas fa-igloo" color="RED" size="lg" />
    </BoostProvider>
  )
}

FAQs

Package last updated on 27 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc