Assuming you are using a standard accordion-header
class with display: flex
, you can add the following JavaScript code to center the child elements within the header:
index.tsx219 chars8 lines
This code selects all elements with the accordion-header
class and applies the justify-content: center
and align-items: center
properties to center the child elements within the header.
Alternatively, you can add the following CSS code to a stylesheet:
89 chars6 lines
This code sets the display
property to flex
and applies the justify-content: center
and align-items: center
properties to center the child elements within the header.
gistlibby LogSnag