-
Notifications
You must be signed in to change notification settings - Fork 10
Support custom components for PricingSlot's price & title #7
Copy link
Copy link
Open
Description
I think it'd be nice to support custom components for the PricingSlot price & title (possibly elsewhere too, these seem like the most important to be customisable to me).
I started working on this, I'll publish the branch to my fork soon (I want to test it more & write an example, possibly tests too).
Would you be open to this ?
Here's how it currently looks like:
<PricingSlot
priceText="$ 200"
priceAccessor={customPrice}
>const customPrice = ({ className, text }) => {
return (
<li className={className}>
<span>Starting at</span>
<span>{text}</span>
</li>
)
}The className & text props are "tags" & this.props.priceText respectively. Not sure we should pass them to custom components, but then again why not ? And I've made pretty much the same thing for the title, allowing for custom title component.
Thoughts ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels