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

fix(NcAppNavigationCaption): Make color main-text for accessibility #4885

Merged
merged 1 commit into from
Nov 29, 2023
Merged
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
105 changes: 60 additions & 45 deletions src/components/NcAppNavigationCaption/NcAppNavigationCaption.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
<docs>
```vue
<template>
<NcAppNavigationCaption
name="Your caption goes here">
<template #actions>
<NcActionButton>
<template #icon>
<Plus :size="20" />
</template>
This is an action
</NcActionButton>
</template>
</NcAppNavigationCaption>
<ul>
<NcAppNavigationCaption
name="Your caption goes here">
<template #actions>
<NcActionButton>
<template #icon>
<Plus :size="20" />
</template>
This is an action
</NcActionButton>
</template>
</NcAppNavigationCaption>
</ul>
</template>
<script>
import Plus from 'vue-material-design-icons/Plus'
Expand All @@ -22,43 +24,51 @@
},
}
</script>
<style scoped>
/* mock the appnavigation */
ul {
background-color: #cce6f4;
}
</style>
```

### Element with a slot for custom actions icon
```vue
<template>
<NcAppNavigationCaption
name="Your caption goes here">
<template #actionsTriggerIcon>
<Plus slot="icon" :size="20" />
</template>
<template #actions>
<NcActionButton>
<template #icon>
<Pencil :size="20" />
</template>
Rename
</NcActionButton>
<NcActionButton>
<template #icon>
<Delete :size="20" />
</template>
Delete
</NcActionButton>
<NcActionButton>
<template #icon>
<ArrowRight :size="20" />
</template>
Validate
</NcActionButton>
<NcActionButton>
<template #icon>
<Download :size="20" />
</template>
Download
</NcActionButton>
</template>
</NcAppNavigationCaption>
<ul>
<NcAppNavigationCaption
name="Your caption goes here">
<template #actionsTriggerIcon>
<Plus slot="icon" :size="20" />
</template>
<template #actions>
<NcActionButton>
<template #icon>
<Pencil :size="20" />
</template>
Rename
</NcActionButton>
<NcActionButton>
<template #icon>
<Delete :size="20" />
</template>
Delete
</NcActionButton>
<NcActionButton>
<template #icon>
<ArrowRight :size="20" />
</template>
Validate
</NcActionButton>
<NcActionButton>
<template #icon>
<Download :size="20" />
</template>
Download
</NcActionButton>
</template>
</NcAppNavigationCaption>
</ul>
</template>
<script>
import ArrowRight from 'vue-material-design-icons/ArrowRight'
Expand All @@ -77,6 +87,12 @@
}
}
</script>
<style scoped>
/* mock the appnavigation */
ul {
background-color: #cce6f4;
}
</style>
```

</docs>
Expand Down Expand Up @@ -146,13 +162,12 @@ export default {

&__name {
font-weight: bold;
color: var(--color-primary-element);
color: var(--color-main-text);
font-size: var(--default-font-size);
line-height: $clickable-area;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
opacity: $opacity_normal;
box-shadow: none !important;
flex-shrink: 0;
// padding to align the name with the icon of app navigation items
Expand Down
Loading