Add a class to the button to show current state

Created on 13 September 2024, 2 months ago

Problem/Motivation

I'd like to show a + or - via css depending on the collapsed state.

It would be possible with something like ".expandable-formatter--content.js-collapsed + div .button" but would be much easier if there was just a class that toggled on the button.

Proposed resolution

Add a "expanded" class to the button when the content is expanded.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom dahousecat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024