Comments (2)
Hmm, not by default but you might be able to add support for this locally in your project. If you use the useRestyle
hook, you'll get all the final style values and have a chance to further process them before setting them on a component. I've never used react-native-extended-stylesheet but perhaps something like this would be possible:
const Component = (props: Props) => {
const props = useRestyle(restyleFunctions, rest);
// A function (or hook) that further processes the style values to add support for REM etc.
// Not sure if something like this is readily available from react-native-extended-stylesheet.
const extendedStyle = processStyle(props.style);
return (
<View {...props} style={extendedStyle} />
);
};
from restyle.
Thanks I will give that a shot :)
from restyle.
Related Issues (20)
- Turning theme into regular values
- Meta: Turn on GitHub Discussions for repository HOT 1
- Let Text component support flex prop HOT 1
- React.Children.only expected to receive a single React element child.
- Export useDimensions hook? HOT 4
- Is this Library abandoned? HOT 5
- using createVariant throws: undefined is not a function HOT 1
- Flex gap support RN 0.71.X
- How to wrap KeyboardAvoidingView in Box? HOT 1
- Breaking Change in update from 2.1.0 to 2.2.0/2.3.0?
- Custom themed components are losing spacing props after upgrade from 2.3.0 to 2.4.0 HOT 4
- TS error when attempting to create multiple variants with different keys in the theme object HOT 4
- TS error: When I use position restyleFunctions HOT 5
- React Native 0.72 support HOT 2
- Theming is not working as expected HOT 1
- Error: Value '#0F0E0F' does not exist in theme['colors']
- undefined is not a function [buildStyle(@shopify/restyle/dist/composeRestyleFunctions)] HOT 1
- error in composeRestyleFunctions HOT 2
- composeRestyleFunctions not accepting `border` HOT 1
- Cannot make custom component HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from restyle.