This project provides a simple extension of the Material-UI Box component called Flex. It mimics the behavior
of flexbox-react and exposes a similar API. All the props of Box are also available via Material-UI's built-in styling
functions (which is in turn insipired by styled-system).
This version includes a fix for a the min-height bug that interferes with the ability to create scrollable flex elements for Firefox.
This library greatly simplifies layout styling in JSX. If you know how to use flexbox, you know how to use the Flex
component.
There's no need for , ,
yarn add mui-blox
# or
npm install --save mui-blox
Material-UI v4 or greater.
import React from 'react'
import { Flex } from 'mui-blox
import { Button } from '@material-ui/core
const MyComponent = props => {
return (
<Flex justifyContent='space-between' p={1}>
<Button onClick={() => doSomething()}>Button1</Button>
<Button onClick={() => doSomethingElse()}>Button2</Button>
</Flex>
)
}
This project is licensed under the MIT License - see the LICENSE.md file for details