WordPress/gutenberg

Allow the PanelColorSettings to be visible if no colors and but with children

Open

#12,583 建立於 2018年12月4日

在 GitHub 查看
 (6 留言) (0 反應) (0 負責人)JavaScript (9,607 star) (3,893 fork)batch import
Good First IssueNeeds Dev[Package] Components[Type] Enhancement

描述

Is your feature request related to a problem? Please describe. With the PanelColorSettings, if the color prop is empty, the entire panel stops rendering. However, if PanelColorSettings has children, they won't show anymore also if the color prop is empty. I expect that the panel would still show up if it has children even with no color options available.

Describe the solution you'd like The PanelColorSettings should only hide if there are no color options AND no children. Right now is only checks the number of color options.

Describe alternatives you've considered I tried creating my own PanelColorSettings component to address this, but it uses a lot of unexposed / private components.

貢獻者指南

Allow the PanelColorSettings to be visible if no colors and but with children · WordPress/gutenberg#12583 | Good First Issue