question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow for passing in arbitrary styles

See original GitHub issue

Would 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:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

6reactions
conrad-vanlcommented, Jan 19, 2018

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.

5reactions
mfrachetcommented, Jun 1, 2018

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 😊

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found