Closed kenny-f closed 4 years ago
As in, you mean extra props to pass to your bulletlist?
Does a <MyBulletList>
which passes things through to BulletList
and spreads in other props too, not work?
@wooorm
As in, you mean extra props to pass to your bulletlist?
Yes that is what I mean.
I guess that I could work around it by creating a wrapping component, but it gets a bit tedious if I had <TwoColumnBulletList>
, <ThreeColumnBulletList>
, <FourColumnBulletList>
etc...
How would that new example work with options-level predefined props? Still tedious, right? 🤔
Thanks @wooorm decided to create inline components that pass the props down to the component. Closing as there is no further action needed
When specifying custom components I would like to provide custom props
From the example options below I cannot provide props to
BulletList
orText
It would be good to support something like
Why would I want this?
To change the behaviour or styles of the default BulletList (eg) via a prop for a specific case.
If I had a function like:
I could override it by:
Problem
This would be a breaking change to the current api.
Happy to create a PR for this if it is deemed useful or if someone knows if this is supported already and/or has a workaround please drop a comment.