1.0.1 • Published 4 years ago

@mdkroon/react-ui-components v1.0.1

Weekly downloads
-
License
GNU GPLv3
Repository
github
Last release
4 years ago

@mdkroon/react-ui-components

React ui components library

NPM JavaScript Style Guide

Install

npm install --save @mdkroon/react-ui-components

Usage

Import the components from @mdkroon/react-ui-components

import React from 'react'
import { Gutter, MaxWidth, Spacer } from '@mdkroon/react-ui-components'

const YourComponent = () => {
  return (
    <MaxWidth size={1200}>
      <Gutter size={12}>
        Some text here
        <Spacer height={10}/>
        More text here
      </Gutter>
    </MaxWidth>
  )
}

export default YourComponent

Gutter

PropTypeRequiredDefaultNote
sizenumberyes-gutter size i.e. the padding-left and padding-right
childrennodeyes-content of the component
classNamestring or objectnogutterCSS classname or CSS Module
unitstringnopxto change the unit of the size (to % or vw)

MaxWidth

PropTypeRequiredDefaultNote
sizenumberyes-maximum with of the content
childrennodeyes-content of the component
classNamestring or objectnomax-widthCSS classname or CSS Module
unitstringnopxto change the unit of the size (to % or vw)

Spacer

PropTypeRequiredDefaultNote
heightnumberyes-height in px of de spacer
classNamestring or objectnospacerCSS classname or CSS Module

Example

An example can be viewed on github pages

Credits

This project is bootstrapped with create react library

License

GNU GPLv3 © MDKroon