1.0.1 β€’ Published 4 years ago

feather-react-components v1.0.1

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

feather-react-components

My most used components πŸ’ƒπŸΌπŸ“¦

NPM JavaScript Style Guide

Install

npm i feather-react-components

Components

Card

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the component.
classesobjectOverride or extend the styles applied to the component.
widthstringThe width of the component.
backgroundstring#ffffffThe background of the component.
roundedstring5pxRounded corners.
marginstringautoThe margin of the component.
paddingstring20pxThe padding of the component.
shadowstring0 4px 10px rgba(0, 0, 0, 0.07)The values of the box-shadow. 0px to disable.
flexDirectionstringrowThis establishes the main-axis. Values: row | row-reverse | column | column-reverse
justifyContentstringstartThis defines the alignment along the main axis. Values: flex-start | flex-end | center | space-between | space-around | space-evenly | start | end | left | right| unsafe

Usage

import { Card } from 'feather-react-components'

render() {
  <Card flexDirection="column" width="300px">
    // your content
  </Card>
}

Text

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the component.
classesobjectOverride or extend the styles applied to the component.
fontFamilystringRobotodefines the font that is applied to the text.
fontSizestring18pxSpecifies the size, or height, of the text.
fontWeigthstring400Sets the weight, or thickness, of the text.
colorstring#000000Define the color of the component.
variantstringApplies the theme typography styles. Values: h1 | h2 | h3 | h4 | h5 | h6 | subtitle1 | subtitle2 | body1 | body2 | caption | overline

Usage

import { Text } from 'feather-react-components'

render() {
  <Text>
    // your content
  </Text>

  <Text variant="h1">h1. Heading</Text>

  <Text variant="h2">h2. Heading</Text>

  <Text variant="h3">h3. Heading</Text>

  <Text variant="h4">h4. Heading</Text>

  <Text variant="h5">h5. Heading</Text>

  <Text variant="h6">h6. Heading</Text>

  <Text variant="subtitle1">
    subtitle1. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
    Quos blanditiis tenetur
  </Text>

  <Text variant="subtitle2">
    subtitle2. Lorem ipsum dolor sit amet, consectetur adipisicing elit.
    Quos blanditiis tenetur
  </Text>

  <Text variant="body1">
    body1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
    blanditiis tenetur unde suscipit, quam beatae rerum inventore
    consectetur, neque doloribus, cupiditate numquam dignissimos laborum
    fugiat deleniti? Eum quasi quidem quibusdam.
  </Text>

  <Text variant="body2">
    body2. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos
    blanditiis tenetur unde suscipit, quam beatae rerum inventore
    consectetur, neque doloribus, cupiditate numquam dignissimos laborum
    fugiat deleniti? Eum quasi quidem quibusdam.
  </Text>

  <Text variant="caption">caption text</Text>

  <Text variant="OVERLINE">Overline Text</Text>
}

Container

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the component.
classesobjectOverride or extend the styles applied to the component.
maxWidthstring920pxUsed to set the maximum width of the container.
paddingstring0 18pxdefines the innermost portion of the container.

Usage

import { Container } from 'feather-react-components'

render() {
  <Container>
    // your content
  </Container>
}

Spacer

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the component.
widthstringThe width of the component.
heightstringThe height of the component.

Usage

import { Spacer } from 'feather-react-components'

render() {
  <Spacer height="20px" />
}

Avatar

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the component.
classesobjectOverride or extend the styles applied to the component.
widthstring100pxThe width of the component.
heightstring100pxThe height of the component.
roundedstring5pxRounded corners.
marginstring18pxThe margin of the component.
backgroundstringThe background of the component, if you don't want to use a image.
imagestringThe Image of the avatar.

Usage

import { Avatar } from 'feather-react-components'

render() {
  <Avatar background="#08B1C5" margin="auto" />
}

Button

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the button.
classesobjectOverride or extend the styles applied to the button.
disableboolSets the state of the button.
widthstring100%The width of the button.
heightstring48pxThe height of the button.
roundedstring5pxRounded corners.
backgroundstring#000000The background of the button.
disableBackgroundstring#666666The background of the button when is disable.
colorstring#ffffffDefine the color of the component.
disableColorstringThe background of the button when is disable.
marginstringThe margin of the button.
paddingstringThe padding of the component.
fontSizestring0.875remSpecifies the size, or height, of the text.
fontWeigthstringSets the weight, or thickness, of the text.
onClickfuncSets function of the handlerClick.

Usage

import { Button } from 'feather-react-components'

render() {
  <Button
    background="#08B1C5"
    margin="20px 0"
    onClick={() => console.log('Hello πŸ’ƒπŸΌ')}
  >
    Hello πŸ’ƒπŸΌ
  </Button>
}

ImageContainer

Go to components

Props

NameTypeDefaultDescription
childrennodeThe content of the button.
classesobjectOverride or extend the styles applied to the button.
widthstring100pxThe width of the button.
heightstring100pxThe height of the button.
imagestringThe background of the component.

Usage

import { ImageContainer } from 'feather-react-components'

render() {
  <ImageContainer
    image={/* url or path */}
    width="400px"
    height="300px"
  />
}

License

MIT Β© F34th3R