cagov / ca-design-system-gutenberg-blocks

DEPRECATED: CA Design System Gutenberg blocks for WordPress.
MIT License
4 stars 5 forks source link

Add Support For Custom Class Names #78

Closed ian-pvd closed 3 months ago

ian-pvd commented 2 years ago

The design system blocks are registered with the customClassName property enabled, and show the field in the admin. Screen Shot 2022-09-15 at 15 52 12

However, there is no support for adding this class to the markup in either the render callback function or the block editor JS.

This is a proposal to add support for customClassName to the design system blocks. This would enable classes to be applied to markup using the "Additional CSS class(es)" field, as well as allowing Block Styles to be applied.

I've opened a PR here with an example change on the accordion block: https://github.com/cagov/ca-design-system-gutenberg-blocks/pull/77