mujo-code / box Goto Github PK
View Code? Open in Web Editor NEWA utility component to add a emotionjs css style guide to component props.
A utility component to add a emotionjs css style guide to component props.
To make Box 100% compatible with react-native
we need to be able to pass css
so we can pass css from @emotion/native.
import { View } from 'react-native'
import { css } from '@emotion/native'
const Box = withBox({
styleGuide,
css,
defaultComponent: View
})
I also think an interesting change that needs to also happen is that we will need to pass the styles into the style props. Instead of using the css prop.
// Web
<BoxComponent ref={ref} css={results.styles} {...otherProps} />
// Native
<BoxComponent ref={ref} style={[results.styles]} {...otherProps} />
I have got tons of use out of this component and will continue to use this component, but I have seen some of the shortcomings of the way this is setup.
I want to lock down some of the defaults to be more in-line with react native, and more inline with yoga. I think this has been super valuable to be able to. yogalayout.com This is a subset of CSS, and also a very powerful one. Locking this down will also limit the scope of the CSS that we need to support.
Allow for style guides to be injected via emotion-themeing. This gives a clear and nonmutating way to be able to add extra styles and have a better experience with custom themes. This also will allow us to be typesafe while add custom theming.
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.