-
Notifications
You must be signed in to change notification settings - Fork 95
Labels
feature: actionsRelated to the actions componentsRelated to the actions components
Description
Currently sub menus are implemented almost manually via:
<template v-if>
<NcActionButton is-menu>
It works, but:
- Not great in a11y, including lack of attributes and focus movement
- Not very semantic for developers
- Requires manual implementing of menu/submenu state, the back button
Proposal: allow to use slots for additional menus like
<NcActions>
<template #default>
<NcActionButton menu="foo">
Sub-menu foo
</NcActionButton>
</template>
<template #menu-foo>
<!-- Content -->
</template>
</NcActions>
So that:
- Formal
is-menu
buttons actually switch to another slot (just renders other buttons) - We have a better separation between sub-menus
- We can implement it internally with a11y
The only thing I don't like here, is that we still have to check for the default slot for inline
buttons...
What do you think?
jaylinski and marcoambrosini
Metadata
Metadata
Assignees
Labels
feature: actionsRelated to the actions componentsRelated to the actions components