ItsJonQ / g2

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

Missing font size presets option on font size component of typography tools #162

Closed jorgefilipecosta closed 3 years ago

jorgefilipecosta commented 3 years ago

On font size under typography tools https://g2-components.xyz/iframe.html?id=designtools-presentation-typographypanel--default&viewMode=story we should have the option to have font size presets display in a custom select control (where each option shows the font size used). Even if font size presets in the future may not be a common thing we need to be back-compatible with the current font size presets.

image

Current version on WordPress components:

image

ItsJonQ commented 3 years ago

Thanks @jorgefilipecosta !!

Related: https://github.com/ItsJonQ/g2/issues/161

ItsJonQ commented 3 years ago

The SelectDropdown component was recently merged: https://github.com/ItsJonQ/g2/issues/161

I'm going to see if I can recreate the FontSizePicker in G2 to accommodate this use case. The internal state management will be interesting. I'm sure it can be made easier using substate.

That means the internal implementation will differ from the one using within @wordpress/components. I think that's okay 😊