1.0.9 • Published 3 years ago

fresh-breath v1.0.9

Weekly downloads
19
License
MIT
Repository
github
Last release
3 years ago

fresh-breath

NPM JavaScript Style Guide

Install

# Install fresh-breath for React project
npm install --save fresh-breath

Quickstart

import React from 'react'

import { Button } from 'fresh-breath'

const Example = () => {
  return <Button>Click me!</Button>
}

Components

Anchor

PropsDesciptionTypeDefault
colorcan be set to any supported CSS value e.g. #fffstring-
hoveradds animation on mouse hoverbooleanfalse
underlineadds a line under anchor on hoverbooleanfalse
Extraobject with Content and position keys whichadds an icon near the anchor, first is icon pathand second sets position to either left or rightobject-
sizecan be set to large/medium/smallstringmedium

Button

typecan be set to success/errorstring-
hoveradds hover effectbooleanfalse
inlinemakes button thinnerbooleanfalse

Breadcrumb

Simple breadcrumb menu with only one items array prop, each item is an object with link and text keys,first defines a path to follow and second is a menu item's button value.

Card

Commonly seen card component, consists of image, heading and paragraph. Important!The card's components depends on order of the props. Thus first three props passed must me either img/heading/paragraph. Change this order in a way you want your card component rendered.

PropsDesciptionTypeDefault
imgobject with url and alt keys whichspecifies card's image, first is an image pathand second sets the name of your imageobject-
headingsets card's headingstring-
paragraphsets card's contentstring-

Modal

titlesets modal's titlestring-
textsets modal's contentstring-
buttonsarray of objects which specifies modal's buttons,object has text and onPress keys, text setsbutton's value, onPress is a function to beexecuted on button clickobject-

Search

widthsets search bar's widthnumber380px
inputvalue which holds search's valuevariable-
onChangefunction to update search's inputfunction-
submitfunction to be executed on search submitfunction-

Layout

Flex

Layout which represents a common css flex property.

PropsDesciptionTypeDefault
directionsets flex's direction, can be column / row /column-reverse / row-reversestringrow
alignsets flex items' vertical alignment, can beflex-start / center / flex-end / revertstringcenter
justifysets flex items' horizontal alignment, can beflex-start / center / flex-end / revert /space-between / space-aroundstringcenter
wrapspecifies whether items should be wrappedbooleanfalse

Grid

Represents grid layout

gapsets gap between grid itemsstring1rem
evenlymakes all grid items same width, can be alsobe a value which specifies items minimal widthbooleanstring300px
justifysame as flex's justify propstring-
colssets grid's column numbernumber4

Table

headingarray of strings to appear in table's headerarray-
dataarray of objects to fill table's rows and cellsarray-
wrapwhether to wrap table's cellsbooleanfalse

License

MIT

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago