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.

Add a component prop to RadioInput.Option that wraps its contents

See original GitHub issue

Adding a Tooltip around a single RadioInput.Option is not possible since RadioInput.Group expects RadioInput.Option to be a direct child.

Possibly adding a component prop to RadioInput.Option and wrapping its contents with that given component on render would provide more flexibility for such use cases.

<RadioInput.Option component={<Tooltip />} />

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
montezumecommented, Oct 25, 2019

I would probably do something like

RadioInput.Option components={{WrapperComponent: <Tooltip />}} />

To follow the pattern we use in … Tooltip 😆

https://github.com/commercetools/ui-kit/blob/0b4b7e9e2f48fdeb2588c62fa5d2f4baec3bed9e/src/components/tooltip/tooltip.js#L165

0reactions
dogayukselcommented, Oct 25, 2019

@montezume Sounds good to me, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use radio buttons in ReactJS? - Stack Overflow
Here is the simplest way of implementing radio buttons in react js. class App extends React.Component { setGender(event) { console.log(event.target.value); } ...
Read more >
How To Create Wrapper Components in React with Props
To create wrapper components, you'll first learn to use the rest and spread operators to collect unused props to pass down to nested...
Read more >
RadioItems | Dash for Python Documentation | Plotly
RadioItems is a component for rendering a set of radio (or option) buttons. ... The options and value properties are the first two...
Read more >
Input Components - React-admin - Marmelab
The parse prop accepts a callback taking the value from the input (which is a string), and returning the value to put in...
Read more >
Pure CSS Custom Styled Radio Buttons
Learn to create custom, cross-browser, theme-able, scalable radio buttons in pure CSS and ensuring styles remain accessible across states.
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