0.2.7 • Published 4 years ago

@tourepedia/box v0.2.7

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

Box

Base component to use the css with defined props instead of class names e.g. instead of passing className="bg-green-100", we can now pass backgroundColor="green-100". This component has full typescript support for all available props with there values, removing any kind of typo errors in class names.

Installation

npm install --save @tourepedia/box

This package also installs the required css module @tourepedia/css which should be imported in your application.

Usage

This component accepts almost all the props to add any styles that can be applied using class name. Some props also have responsive values which can be passed directly via props only.

import Box from "@tourepedia/box"

function App() {
  return (
    <Box
      as="button"
      backgroundColor="green-300"
      backgroundColorHover="green-200"
      textColor="green-800"
      padding="4"
      paddingLg="6"
      border="2"
      rounded="lg"
      outlineFocus="none"
    >
      Some Text Here
    </Box>
  )
}
0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.4

4 years ago

0.1.5

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago