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.

Placeholder component

See original GitHub issue

🚀 Feature Proposal

A clear and concise description of what the feature is.

Add a Placeholder component which serves as default value when no Source is present.

Example implementation: https://gist.github.com/IniZio/68872edc1acf2ecfadf5ffffa06f321a

Motivation

Please outline the motivation for the proposal.

Provider a default value to Target

Example

Please provide an example for how this feature would be used.

const Header = createTeleporter()

<Header.Target/>

<Header.Placeholder>This is placeholder</<Header.Placeholder>

// This is placeholder
const Header = createTeleporter()

<Header.Target/>

<Header.Placeholder>This is placeholder</<Header.Placeholder>

<Header.Source>Source 1</<Header.Source>

// Source 1

Pitch

Why does this feature belong in the xstyled ecosystem?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gregbergecommented, Dec 18, 2019

#12 solves it.

0reactions
IniZiocommented, Jun 21, 2019

The react-tunnels lib allow toggling multiple so that the teleported content will either concat each other or replace other.

Currently react-teleporter Source just concats each other, but I think replace is actually the more common use case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Placeholder | Semantic UI
A placeholder is used to reserve space for content that soon will appear in a layout. Placeholders can include paragraph , header ,...
Read more >
Placeholder Component | Figma Community
7 placeholder variants that you can use when designing interfaces: Default; Image; Video; Audio; Title; Text; Button.
Read more >
React Placeholder Component - CoreUI
Placeholders can be used to enhance the experience of your application. They're built only with HTML and CSS, meaning you don't need any...
Read more >
Component Placeholders
Purpose. ACS AEM Commons adds some helper CSS classes for creating nice component placeholders for the AEM Classic UI: Extra Icons. cq- ...
Read more >
Placeholders · Bootstrap v5.1
Use loading placeholders for your components or pages to indicate something may still be loading.
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found