Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@horacehylee/flexbox-react
Advanced tools
Unopinionated, standard compliant flexbox component. No propietary APIs. Nothing but flexbox.
Unopinionated, standard compliant flexbox components.
You should not learn any proprietary syntax, classnames or API's for this.
If you know how to use flexbox, you know how to use flexbox-react
components.
No more <Container>
, <SpacedBox>
, <Column>
, <View>
, <Section>
or any other
arbitrarily named and spec ed components to layout your apps.
No more first={true}
, ternary={true}
, spaced={true}
,grouped={true}
or any other arbitrarily named and spec ed props to layout your apps.
flexbox-react
is agnostic of which post/pre css build flow you have, it works out of the box. It's agnostic to it. You could have all your styling on css files. Or all inlined. This sits just in the middle. It might be a good idea to see your components and know how they are laid out without jumping between css files or arbitrary, layout-exclusive components specifications.
No hardcoded, bloated, unnecessary vendor prefixes, by
caniuse. Just those your browser needs, based
on your userAgent
.
No need to import any new stylesheet or to add any styles to your existing stylesheets. It works out of the box, just by using the component.
yarn add @horacehylee/flexbox-react
# or
npm install --save @horacehylee/flexbox-react
import Flexbox from 'flexbox-react';
// ...
<Flexbox flexDirection="column" minHeight="100vh">
<Flexbox element="header" height="60px">
Header
</Flexbox>
<Flexbox flexGrow={1}>
Content
</Flexbox>
<Flexbox element="footer" height="60px">
Footer
</Flexbox>
</Flexbox>
Sticky footer!
As you can see, there're some extra props as layout ing helpers. Those are height
, minHeight
, maxHeight
, width
, minWidth
, maxWidth
, padding
, paddingTop
, paddingRight
, paddingBottom
, paddingLeft
, margin
, marginTop
, marginRight
, marginBottom
, and marginLeft
. The idea of flexbox-react
is to be a complete solution to build layouts. Since, well, flexbox is a complete solution to build layouts. It's all about the sugar. Feel free to create an issue or submit a PR if you think there's room for improvement here!
If you need to use a tag other than <div>
for the layout, like <header>
or <section>
, you can pass an extra element
prop to the <Flexbox />
component:
<Flexbox element="header" height="80px">
...
</Flexbox>
which will render to this:
<header style="display: flex; height: 80px;">
...
</header>
Take a look at Flexbox PropTypes. No mysteries. As said, you just need to know actual flexbox properties not any proprietary syntax for them. If you're not familiar with flexbox, this is a good starting point.
If TypeScript is your cup of tea, check the type definitions, we support them too.
MIT © Ignacio Álvarez
FAQs
Unopinionated, standard compliant flexbox component. No propietary APIs. Nothing but flexbox.
We found that @horacehylee/flexbox-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.