Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions src/components/NcActions/NcActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,86 @@ export default {
</script>
```

### Wide buttons

```vue
<template>
<NcActions menu-name="Object management" wide>
<template #icon>
<IconPencilOutline :size="20" />
</template>
<NcActionButton>
<template #icon>
<IconPencilOutline :size="20" />
</template>
Rename
</NcActionButton>
<NcActionButton>
<template #icon>
<IconTrashCanOutline :size="20" />
</template>
Delete
</NcActionButton>
<NcActionButton>
<template #icon>
<IconArrowRight :size="20" />
</template>
Validate
</NcActionButton>
<NcActionButton>
<template #icon>
<IconTrayArrowDown :size="20" />
</template>
Download
</NcActionButton>
</NcActions>
<NcActions wide>
<template #icon>
<IconPencilOutline :size="20" />
</template>
<NcActionButton>
<template #icon>
<IconPencilOutline :size="20" />
</template>
Rename
</NcActionButton>
<NcActionButton>
<template #icon>
<IconTrashCanOutline :size="20" />
</template>
Delete
</NcActionButton>
<NcActionButton>
<template #icon>
<IconArrowRight :size="20" />
</template>
Validate
</NcActionButton>
<NcActionButton>
<template #icon>
<IconTrayArrowDown :size="20" />
</template>
Download
</NcActionButton>
</NcActions>
</template>
<script>
import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'
import IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
import IconTrayArrowDown from 'vue-material-design-icons/TrayArrowDown.vue'
import IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'

export default {
components: {
IconArrowRight,
IconTrashCanOutline,
IconTrayArrowDown,
IconPencilOutline,
},
}
</script>
```

### Use cases

```vue
Expand Down Expand Up @@ -1178,6 +1258,14 @@ export default {
default: null,
},

/**
* Specifies whether the button should span all the available width.
*/
wide: {
type: Boolean,
default: false,
},

/**
* Specify the size used for trigger and single actions buttons.
*
Expand Down Expand Up @@ -2072,6 +2160,7 @@ export default {
`action-item--${this.triggerButtonVariant}`,
{
'action-item--open': this.opened,
'action-item--wide': this.wide,
},
],
},
Expand Down Expand Up @@ -2124,6 +2213,10 @@ export default {
background-color: var(--open-background-color);
}

&.action-item--wide {
width: 100%;
}

&__menutoggle__icon {
width: 20px;
height: 20px;
Expand Down