paul-thebaud / v-phone-input

International and accessible phone input for Vuetify 3 and Vue 3.
https://paul-thebaud.github.io/v-phone-input/
MIT License
65 stars 6 forks source link

feat: add prop 'example' #20

Closed ricardo17coelho closed 10 months ago

ricardo17coelho commented 10 months ago

Expected Behavior

In order to be possible to display an more "realistic" example would be nice if there is an "example" prop to be possible to provide the example value

Actual Behavior

Example is auto-generated

paul-thebaud commented 10 months ago

Hi @ricardo17coelho, What's the point on this? Example is automatically generated depending on the country, because it should not be same from a country to another. What do you expect for this new prop? Passing a string example or an example generation callback function?

ricardo17coelho commented 10 months ago

Hi @paul-thebaud

An example "string" would be nice. For ex: for swiss number, the format is like: 012 456 78 90 and i want the example as: 079 000 00 00 in order to be more realistic. Generally i think this "possibility" would give the users more flexibilitiy. If the prop example is not overrided the component should use the internall generator. thx :)

paul-thebaud commented 10 months ago

@ricardo17coelho New example prop have been added inside v4.1.0 :tada: It support a string or a callback to generate the example based on a country object!

ricardo17coelho commented 10 months ago

Thx 🙏 @paul-thebaud