1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-23 03:54:21 +00:00
bluelib/src/components/Color
2021-03-23 18:15:30 +01:00
..
index.js 🧹 Fix some thingies 2021-03-23 18:15:30 +01:00
Readme.md 🧹 Fix some thingies 2021-03-23 18:15:30 +01:00

Change the bluelib color of the contained elements.

The color can chosen through either the builtin prop or the custom prop.

By using the builtin prop, the color will automatically adapt itself to the theme. Possible builtin colors are:

  • "red"
  • "orange"
  • "yellow"
  • "lime"
  • "cyan"
  • "blue"
  • "magenta"
  • "gray"

By using the custom prop, the color will be the same for all themes, but you will be able to specify any color.

import Bluelib from "../Bluelib";
import Box from "../Box";

<Bluelib>
    <div>
        <Color builtin={"red"}>
            <span>
                Red
            </span>
        </Color>
    </div>
    <div>
        <Color builtin={"orange"}>
            <Box>
                Orange
            </Box>
        </Color>
    </div>
    <div>
        <Color custom={"#ffff00"}>
            <Box>
                Custom yellow
            </Box>
        </Color>
    </div>
</Bluelib>