Giter VIP home page Giter VIP logo

react-components's Introduction

Usage

yarn add @audentio/components

import { Button } from '@audentio/components/Button';

const App = () => <Button>Hello world</Button>;

Setup (ignore if using kinetic):

1. Allow audentio scoped components to be transpiled

This involved adding an exclude key in your loader config

module: {
    rules: [
        {
            test: /\.(js|jsx|ts|tsx)$/,
            exclude: /node_modules\/(?!(@audentio)\/).*/,
            ...

2. Setup sass variables

These components expect certain variable keys to be available globally. To do this:

  1. Install sass-resource-loader: yarn add sass-resource-loader

  2. Add sass-resource-loader in your webpack config after sass-loader:

module: {
    rules: [{
        test: /\.scss$/,
        use: [
            'style-loader',
            'sass-loader',
            {
                loader: 'sass-resources-loader',
                options: {
                    resources: [path.resolve(process.cwd(), 'src/theme.scss')],
                },
            },
        ],
        ...
  1. Add the following variables to theme.scss (and modify as required)
$gutter: 15px;
$gutter-sm: 10px;

$color-backdropBg: rgba(0, 0, 0, 0.5);

// brand colors
$color-primary: #4b67f6;
$color-secondary: #00d7d2;

// state
$color-info: #26b3f7;
$color-danger: #cc5757;
$color-warning: #ffbc2c;
$color-success: #399e66;

$color-contentBg: #1d223d; // page content
$color-cardBg: #282e4d; // cards, containers inside page content

$color-highlightBg: #303658; // table headers, table row highlights, tertiary or otherwise important content, filterbars and some header/sub header backgrounds
$color-pillBg: intensify($color-cardBg, 5%);
$color-border: rgba(85, 80, 128, 0.5);

// input
$color-inputBg: $color-pillBg;
$color-inputBgLight: lighten($color-inputBg, 5%);

// text colors
$color-contentText: #b4b9d2;
$color-emphasisText: white;
$color-secondaryText: #919fb9;
$color-faintText: #5c6388;

// contentwrap
$contentWidth: 1100px;
$contentWidth_narrow: 700px;

react-components's People

Contributors

tushar-singh avatar grantrygh avatar kylerc avatar dependabot[bot] avatar snyk-bot avatar jonw316 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.