0.4.2 β€’ Published 2 years ago

sito-container v0.4.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Sito Container

Super flexible container, very similar to @mui's Box, but defaults to flex

How to use it?

import SitoContainer from "sito-container";

function App() {
    return {
        <SitoContainer>
            Hola Mundo
        </SitoContainer>
    }
}

You can change the name of the container, if you don't like its name πŸ˜‚

import SitoContainer as Container from "sito-container";

function App() {
    return {
        <Container>
            Hola Mundo
        </Container>
    }
}

You can add your css rules, like sx prop for styled-component, style prop like inline css styles and classNames from your css files

import SitoContainer as Container from "sito-container";

function App() {
    return {
        <Container sx={{ width: "350px", height: "350px" }}>
            Hola Mundo
        </Container>
    }
}

Props

NameTypeDefaultDescription
idstringhtml identifier
namestringhtml name
classNamestringcss class name
backgroundstringcontainer background
displaystring"flex"The CSS display property specifies whether an element is treated as a block or inline element and the layout used by its children, such as flow layout, grid, or flex.
flexDirectionstring"row"The flex-direction CSS property specifies how to place flex objects in the flex container by defining the main axis and direction (normal or upside down).
alignItemsstring"left"The align-items CSS property sets the value align-self on all direct descendants of a group.
justifyContentstring"left"The justify-content CSS property defines how the browser allocates space between and around flex items, along the main axis of their container.
childrennodenode children
fullWidthboolfalseif on, width will be set to "100%", otherwise "inherit"
ignoreDefaultboolfalseif on, all props and default styles will be ignored
extraPropsArray<func| object| bool>| func| objectextra props like: onClick, onMouseEnter, etc
sxArray<func| object| bool>| func| objectThe system prop that allows defining system overrides as well as additional CSS styles. See the sx page for more details.
styleArray<func| object| bool>| func| objectinline css

πŸ™Œ Good luck out there my friend πŸ™Œ

0.4.2

2 years ago

0.3.5

2 years ago

0.4.1

2 years ago

0.3.4

2 years ago

0.2.21

2 years ago

0.2.20

2 years ago

0.2.19

2 years ago

0.2.18

2 years ago

0.2.17

2 years ago

0.2.16

2 years ago

0.2.14

2 years ago

0.2.13

2 years ago

0.2.9

2 years ago

0.2.7

2 years ago

0.2.5

2 years ago