Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion: Allow the default caret positions to be changed, for both open & closed, when required #965

Closed
jasonahern opened this issue Feb 13, 2023 · 2 comments · Fixed by #976
Labels
feature request Request a feature or introduce and update to the project.

Comments

@jasonahern
Copy link

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

When an Accordion is used within the AppBar --> sidebarLeft, from a UI perspective it's more natural for the Accordion's default caret position to be pointing towards the right, when closed, for the caret to then point downwards, on open, on a full desktop app.

Granted that the default caret positions make sense when used on mobile, or in the middle of a layout, but when the Accordion is used on the left-hand side of a full desktop layout, the following change feels more natural.

Therefore, please can you consider adding in the ability to do the following :

image

image

What type of pull request would this be?

Enhancement

Any links to similar examples or other references we should review?

No response

@jasonahern jasonahern added the feature request Request a feature or introduce and update to the project. label Feb 13, 2023
@endigo9740
Copy link
Contributor

Just a quick note - if we set props to control the reactive rotation states this should provide easy customization:

$: classesCaretState = openState ? 'rotate-180' : '';

Becomes

export let caretOpen = 'rotate-180';
export let caretClosed = '';

$: classesCaretState = openState ? caretOpen : caretClosed;

@endigo9740
Copy link
Contributor

endigo9740 commented Feb 16, 2023

This can now be configured through two new props:

caretOpen = ''
caretClosed = '-rotate-90'

Preview:

Screenshot 2023-02-16 at 4 19 44 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants