Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Fix breadcrumb component ellipsis
Browse files Browse the repository at this point in the history
Added overflow: hidden on the main element of the oc-breadcrumb to make
sure that it can ellipsize its content in responsive mode.
  • Loading branch information
Vincent Petry committed Jan 31, 2020
1 parent ca75752 commit 56f8f38
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/elements/OcBreadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="oc-breadcrumb">
<div class="oc-breadcrumb uk-overflow-hidden">
<ul class="oc-breadcrumb-list">
<li v-for="(item, index) in items" :key="index">
<router-link v-if="home && index === 0" :to="item.to" class="uk-flex"
Expand Down Expand Up @@ -38,7 +38,7 @@
*
* - text: mandatory element, holds the text which is to be displayed in the breadcrumb
* - to: optional element, the vue router link
* -
*
*/
export default {
name: "oc-breadcrumb",
Expand Down Expand Up @@ -80,7 +80,9 @@ export default {
<docs>
```vue
<template>
<oc-breadcrumb :items="items" home></oc-breadcrumb>
<section>
<oc-breadcrumb :items="items" home></oc-breadcrumb>
</section>
</template>
<script>
export default {
Expand All @@ -90,7 +92,7 @@ export default {
{text:'First folder',to:{path:'folder'}},
{text:'Subfolder', onClick:() => alert('Breadcrumb clicked!')},
{text:'Deep',to:{path:'folder'}},
{text:'Deeper'},
{text:'Deeper ellipsize in responsive mode'},
]
}
}
Expand Down

0 comments on commit 56f8f38

Please sign in to comment.