fremtind / jokul

Jøkul er et designsystem utviklet av Fremtind.
https://jokul.fremtind.no
MIT License
64 stars 31 forks source link

Accordion Item doesn't accept custom className #569

Closed sigvehag closed 4 years ago

sigvehag commented 4 years ago

Describe the bug The accordion items within the accordion does not accept custom classnames. This complicates styling of nested accordions, or different styling of accordion-items within the same accordion.

To Reproduce

  1. Create an accordion containing an accordion item.
  2. Give the accordion item a className.
  3. See that it's not in the html.

Expected behavior I expect to be able to style Accordion Items individually. I'm trying to differentiate a nested sets of accordion-items within an accordion-item as shown below. This is for an internal tool.

Desktop (please complete the following information):

accordion-style

piofinn commented 4 years ago

We really should not nest accordions, but the component should accept custom class names in either case, so I'll start a PR.

I bet this is something a designer would love to take a stab at if you let them 😉 (@Mikkelinski?) I would check out the sketches for FLYT in Figma for inspiration on how to deal with progressive disclosure in containers (cards).

sigvehag commented 4 years ago

Hehe, yeah I know. That's why I specified it was for an internal tool - to "kind of" redeem myself.

I do however have a pretty complex structure that I don't think we will run into too often, so this specific case might not be worth a designers time, but as it's demonstrated in the screenshot above may be something that appears several places.

piofinn commented 4 years ago

I think the complex and "unique" cases can be very rewarding to solve for our designers! We really need practice in using our profile right now, so every problem is a good problem 😁 If you're lucky, they might even find a less complex solution!

A fix for your issue is none the less right around the corner :)