Allow for passing in arbitrary styles
See original GitHub issueWould there be any interest for a PR that added the feature to be able to pass in arbitrary styles to placeholders? We’ve found the built-in props for a few of our use cases to be limiting, especially for fine-tuning the positioning of placeholder elements. We’d hate to wrap the placeholders in additional views, so we’re left with having to build custom placeholders. However, if these components allowed for passing in arbitrary styles for more control, we’d be able to solve for our use case.
I’m happy to open a PR if there’s interest.
<Box style={...} />
<ImageContent style={...} paragraphStyle={...} mediaStyle={...} />
<Line style={...} />
<Media style={...} />
<MultiWords style={...} wordStyle={...} />
<Paragraph lineStyle={...} style={...} />
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Problem with arbitrary values on Tailwind with React
You're using arbitrary values incorrectly. · You can use css variables in some caese text-[color:var(--your-val)] and that pass it through style ...
Read more >mixin and @include
Overview; Passing Arguments to Content Blocks. Indented Mixin Syntax. Mixins allow you to define styles that can be re-used throughout your stylesheet.
Read more >Just-in-Time Mode
Generate arbitrary styles without writing custom CSS. ... To enable just-in-time mode, set the mode option to 'jit' in your tailwind.config.js file:.
Read more >preventing arbitrary style renaming
I'm running into a problem where Word renames styles. Steps to reproduce: 1. Create a blank document. 2. Create a style named "potato"....
Read more >Using CSS custom properties (variables) - MDN Web Docs
First steps with custom properties. Let's start with this CSS that applies the same color to elements of different classes: .one { ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Hey @mfrachet! Apologies, since writing the first message, my wife and I gave birth to our first son, and so I’ve been away from work for a while. I had started this work in this branch before - https://github.com/conrad-vanl/rn-placeholder/tree/style-prop
I believe this might be pull-requestable, and happy to go ahead and open if you like. But might need a little more polish as well.
I’m currently working on, here’s the current state:
<Box style={...} />
<ImageContent style={...} paragraphStyle={...} mediaStyle={...} />
<Line style={...} />
<Media style={...} />
<MultiWords style={...} wordStyle={...} />
<Paragraph lineStyle={...} style={...} />
These are availables thanks to: https://github.com/mfrachet/rn-placeholder/pull/45/files#diff-d69027359d042f61d170dd9c0b8d851cR4
feel free to review the PR to improve the code quality 😊