1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-10-16 13:47:28 +00:00
Customizable, flexible and modular CSS library https://bluelib.gh.steffo.eu/
Find a file
2022-03-12 05:06:02 +01:00
.idea BREAKING: Add useValidatedState hook 2021-09-14 22:58:49 +02:00
.storybook Add builtinColor prop, allowing to choose a builtin color without using bluelibClassNames 2021-10-10 18:23:16 +02:00
public Initialize project 2021-08-14 17:02:47 +02:00
src Add support for Figure and Caption 2022-03-12 05:06:02 +01:00
.gitignore Ignore /out* 2022-02-09 13:53:26 +01:00
.gitmodules ⬆️ Upgrade to bluelib@4 2022-03-12 04:11:30 +01:00
bluelib-react.iml Add layouts 2021-08-17 17:45:29 +02:00
LICENSE.txt 🗒 Write a small README 2021-08-24 13:35:12 +02:00
package.json 📦 Bump version to 5.0.0 2022-03-12 04:22:35 +01:00
README.md ⬆️ Upgrade to bluelib@4 2022-03-12 04:11:30 +01:00
rollup.config.js 📦 Configure typescript to output declarations 2021-08-28 11:38:59 +02:00
tsconfig.json 📦 Configure typescript to output declarations 2021-08-28 11:38:59 +02:00
yarn.lock ⬆️ Upgrade packages where possible 2022-03-12 04:24:17 +01:00

bluelib-react

React bindings for bluelib@4

Documentation

An interactive documentation for bluelib-react is available here, built using Storybook.

Installation

You can download bluelib-react using your favourite node package manager:

$ npm install --save @steffo/bluelib-react
$ yarn add @steffo/bluelib-react

Ensure you have react and react-dom installed, as they are peer dependencies of this package and aren't installed automatically.

Usage

You can import the components you want to use using the ES6 import syntax:

import { Box } from "@steffo/bluelib-react"

All Bluelib components must be inside a <Bluelib> container for them to work correctly!

import { Bluelib, Heading, Box } from "@steffo/bluelib-react"


const MyComponent = props => (
    <Bluelib theme={"royalblue"}>
        <Heading level={1}>
            Hello world!
        </Heading>
        <Box>
            Welcome to Bluelib!
        </Box>
    </Bluelib>
)