1.0.4 • Published 6 years ago

trichotomy-react v1.0.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

trichotomy-react

React components to implement Trichotomy UI.

NPM JavaScript Style Guide

Install

npm install --save trichotomy-react

Usage

The code below will produce this, provided you have loaded this stylesheet, too.

None of the CSS classes in the className property are necessary for this to function. They only add visuals.

However, make sure to have

height: 100%

on your body and #root element of your app!

import React, { Component } from 'react';

import Trichotomy from 'trichotomy-react';

class Example extends Component {
  render () {
    return (
            <Trichotomy
                direction={'vertical'}
                className="demo-container">

                <Trichotomy.Bar
                    className="demo-top bordered">
                    Main Header
                </Trichotomy.Bar>

                <Trichotomy.Centerpiece
                    className="demo-centerpiece bordered">

                    <Trichotomy
                        direction={'horizontal'}>

                        <Trichotomy.Bar
                            className="demo-bar bordered">
                            <Trichotomy
                                direction={'vertical'}>
                                <Trichotomy.Bar
                                    className="demo-top bordered">
                                    Left Sidebar Header
                                </Trichotomy.Bar>

                                <Trichotomy.Centerpiece
                                    className="demo-centerpiece bordered">
                                    Left Sidebar Center
                                </Trichotomy.Centerpiece>

                                <Trichotomy.Bar>
                                    Left Sidebar Footer
                                </Trichotomy.Bar>
                            </Trichotomy>
                        </Trichotomy.Bar>

                        <Trichotomy.Centerpiece
                            className="demo-center bordered">
                            Main Center
                        </Trichotomy.Centerpiece>

                        <Trichotomy.Bar
                            className="demo-bar bordered"
                            right={true}>
                            <Trichotomy
                                direction={'vertical'}>
                                <Trichotomy.Bar
                                    className="demo-top bordered">
                                    Right Sidebar Header
                                </Trichotomy.Bar>

                                <Trichotomy.Centerpiece
                                    className="demo-centerpiece bordered">
                                    Right Sidebar Center
                                </Trichotomy.Centerpiece>

                                <Trichotomy.Bar>
                                    Right Sidebar Footer
                                </Trichotomy.Bar>
                            </Trichotomy>

                        </Trichotomy.Bar>

                    </Trichotomy>
                </Trichotomy.Centerpiece>

                <Trichotomy.Bar>
                    Main Footer
                </Trichotomy.Bar>
            </Trichotomy>
    );
  }
}

License

ISC © tgv1975

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago