jbetancur / react-flexybox Goto Github PK
View Code? Open in Web Editor NEWFlexbox in React made simple
Home Page: https://react-flexybox-demo.netlify.com/
License: MIT License
Flexbox in React made simple
Home Page: https://react-flexybox-demo.netlify.com/
License: MIT License
Change the build to output for both cjs and umd but separately
add "baseline" to proptypes
Add height prop to row
const RowStyle = styled(agnosticComponent)`
box-sizing: border-box;
display: flex;
flex: 0 1 auto;
width: 100%;
flex-direction: ${props => props.direction};
flex-wrap: ${props => props.wrap};
justify-content: ${props => (props.center ? 'center' : props.justifyContent)};
align-items: ${props => (props.center ? 'center' : props.alignItems)};
align-content: ${props => props.alignContent};
${props => props.debug && 'border: 1px solid red'};
${props => props.paddingTop && `padding-top: ${props.paddingTop}`};
${props => props.paddingLeft && `padding-left: ${props.paddingLeft}`};
${props => props.paddingBottom && `padding-bottom: ${props.paddingBottom}`};
${props => props.paddingRight && `padding-right: ${props.paddingRight}`};
${props => props.padding && `padding: ${props.padding}`};
${props => (props.fill ? 'height: 100%' : props.height)};
`;
padding props
center shortcut
fill shortcut
Code in questions: https://github.com/jbetancur/react-flexybox/blob/master/src/utils/styled.js
handle sizes > 1200px
<Col xl={1}>...
e.g. gutters, media widths
The code block is missing the alignSelf tags
if (child && child.type === Col)
seems to not always resolve. Which seems to be the problem
Row should pass props down to Col Instance components only
This was discovered when using Gatsby 2.0 - but I cannot dupe this in any other app that uses react-flexybox
no impact - just annoying
Aside from Codepen - create a full working demo
<Row>
<Col orderXs="1"></Col>
<Col orderXs="0"></Col>
</Row>
Or reverse
<Row reverseXS reverseSM>
<Col orderXs="1"></Col>
<Col orderXs="0"></Col>
</Row>
Thoughts...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.