1.0.0 • Published 5 years ago

react-styled-container v1.0.0

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

react-styled-container

A react component that is basically the same as Bootstrap's .container class but ported to styled-components. This makes it not mandatory to contain the whole of bootstrap's library to use the container class or even any css. just have a react project with styled-components and you are set.

Install using npm

npm install react-styled-container

Install using yarn

yarn add react-styled-container

Usage

The package exports one single component that you use, it has two options that are boolean so it is really easy to use.

import * as React from 'react';
import Container from 'react-styled-container';

export default () => (
  <Container debug fluid>
    <h1>Hello World</h1>
  </Container>
);

Options (props)

PropTypeDescription
debugbooleanThis option makes the background color pink so that you can see the size of the container
fluidbooleanThis option enables the fluid type of the container which if you don't know bootstrap it makes the container full width with 15px padding on each side

License

The MIT License (MIT)

Copyright (c) 2019 Ahmed Tarek

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.0.0

5 years ago