ljharb / prop-types-tools

Custom React PropType validators
MIT License
671 stars 50 forks source link

Adds regex capabilities to componentWithName #11

Closed majapw closed 7 years ago

majapw commented 7 years ago

We have a need for a prop type that will validate a component name using regex. For instance, a particular type of component might accept any children of the form *Row or *Card. It made sense to me to add this ability to componentWithName directly, but am open to creating a new prop type as well. What do you think?

to: @ljharb @airbnb/webinfra

majapw commented 7 years ago

@ljharb can you please take another look?

majapw commented 7 years ago

@ljharb addressed your comments! :)

ljharb commented 7 years ago

Released in v2.5.0.