would be better named --close, as it defines the style for a close button which appears when the panel is open.
Fixing this would mean that we can avoid the back-to-front logic of {% if state == 'open' %}c-sf-add-button--closed{% endif %} in https://github.com/wagtail/wagtail/pull/5476 :-)
The
--closed
classname defined here:https://github.com/wagtail/react-streamfield/blob/e775cd303323daabc6de824d23b1d74d6cb35354/src/scss/components/c-sf-add-button.scss#L36
would be better named
--close
, as it defines the style for a close button which appears when the panel is open.Fixing this would mean that we can avoid the back-to-front logic of
{% if state == 'open' %}c-sf-add-button--closed{% endif %}
in https://github.com/wagtail/wagtail/pull/5476 :-)