Skip to content

Commit

Permalink
fix(NcAppNavigationCaption): Align actions with other app navigation …
Browse files Browse the repository at this point in the history
…actions

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Jun 15, 2023
1 parent d87b428 commit 5cc0663
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue
@@ -1,6 +1,7 @@
<docs>
```vue
<template>
<div>
<NcAppNavigationCaption
name="Your caption goes here">
<template #actions>
Expand All @@ -12,6 +13,45 @@
</NcActionButton>
</template>
</NcAppNavigationCaption>
<NcAppNavigationCaption
name="Your caption goes here sfsdf sdf sdf sdf s dfs df sdf sd fsdf">
<template #actions>
<NcActionButton>
<template #icon>
<Plus :size="20" />
</template>
This is an action
</NcActionButton>
</template>
</NcAppNavigationCaption>
<NcAppNavigationItem name="AppNavigationItemChild1">
<template #icon>
<Plus :size="20" />
</template>
<template #actions>
<NcActionButton @click="alert('Edit')">
<template #icon>
<Plus :size="20" />
</template>
Edit
</NcActionButton>
</template>
</NcAppNavigationItem>
<NcAppNavigationItem name="AppNavigationItemChild2">
<template #icon>
<Plus :size="20" />
</template>
<template #actions>
<NcActionButton @click="alert('Edit')">
<template #icon>
<Plus :size="20" />
</template>
Edit
</NcActionButton>
</template>
</NcAppNavigationItem>
</template>
</div>
</template>
<script>
import Plus from 'vue-material-design-icons/Plus'
Expand Down Expand Up @@ -132,7 +172,6 @@ export default {
.app-navigation-caption {
display: flex;
justify-content: space-between;
padding: 0 calc(var(--default-grid-baseline, 4px) * 2) 0 calc(var(--default-grid-baseline, 4px) * 3);
&__name {
font-weight: bold;
Expand All @@ -145,6 +184,8 @@ export default {
opacity: $opacity_normal;
box-shadow: none !important;
flex-shrink: 0;
// padding to align the name with the icon of app navigation items
padding: 0 calc(var(--default-grid-baseline, 4px) * 2) 0 calc(var(--default-grid-baseline, 4px) * 3);
}
&__actions {
Expand Down

0 comments on commit 5cc0663

Please sign in to comment.