ItsJonQ / g2

✨ An experimental reimagining of WordPress components
http://g2-components.com/
MIT License
105 stars 12 forks source link

Font families should be mainly select based #163

Open jorgefilipecosta opened 3 years ago

jorgefilipecosta commented 3 years ago

The font family control on the typography tools https://g2-components.xyz/iframe.html?id=designtools-presentation-typographypanel--default&viewMode=story should be mainly select based. The user will be presented with a set of font-family options. The user can choose one of the predefined options. I guess if a value outside of one of the options is passed we may render a text input, but that should not be the default.

aristath commented 3 years ago

Agreed. It could be a-la-react-select which would accept custom values too, but it should primarily work as a select input :+1:

ItsJonQ commented 3 years ago

Sounds like we need a ComboBox :)

That's what react-select is (at least it's primary configuration is a combobox).

We can use downshift, which is what we did for the recently added SelectDropdown (same library used in @wordpress/components).