Skip to content

Commit 3c1b851

Browse files
authored
Merge pull request #3654 from nextcloud/feat/bread
Breadcrumb: add exact prop and fix style
2 parents 56b79af + 64dd165 commit 3c1b851

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

src/components/NcBreadcrumb/NcBreadcrumb.vue

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ This component is meant to be used inside a Breadcrumbs component.
4141
@dragleave="dragLeave">
4242
<element :is="tag"
4343
v-if="(title || icon) && !$slots.default"
44+
:exact="exact"
4445
:to="to"
45-
:href="href">
46+
:href="href"
47+
v-bind="$attrs"
48+
v-on="$listeners">
4649
<!-- @slot Slot for passing a material design icon. Precedes the icon and title prop. -->
4750
<slot name="icon">
4851
<span v-if="icon" :class="icon" class="icon" />
@@ -89,42 +92,59 @@ export default {
8992
type: String,
9093
required: true,
9194
},
95+
9296
/**
93-
* The router-link to prop [https://router.vuejs.org/api/#to](https://router.vuejs.org/api/#to)
94-
* If set, the breadcrumbs will be rendered by router-link.
97+
* Route Location the link should navigate to when clicked on.
98+
*
99+
* @see https://v3.router.vuejs.org/api/#to
95100
*/
96101
to: {
97102
type: [String, Object],
98103
default: undefined,
99104
},
105+
106+
/**
107+
* Match the complete route attributes (query and hash included)
108+
*
109+
* @see https://v3.router.vuejs.org/api/#exact
110+
*/
111+
exact: {
112+
type: Boolean,
113+
default: false,
114+
},
115+
100116
/**
101117
* Set this prop if your app doesn't use vue-router, breadcrumbs will show as normal links.
102118
*/
103119
href: {
104120
type: String,
105121
default: undefined,
106122
},
123+
107124
/**
108125
* Set a css icon-class to show an icon instead of the title text.
109126
*/
110127
icon: {
111128
type: String,
112129
default: '',
113130
},
131+
114132
/**
115133
* Disable dropping on this breadcrumb.
116134
*/
117135
disableDrop: {
118136
type: Boolean,
119137
default: false,
120138
},
139+
121140
/**
122141
* Force the actions to display in a three dot menu
123142
*/
124143
forceMenu: {
125144
type: Boolean,
126145
default: false,
127146
},
147+
128148
/**
129149
* Open state of the Actions menu
130150
*/
@@ -289,10 +309,12 @@ export default {
289309
overflow: hidden;
290310
color: var(--color-text-maxcontrast);
291311
padding: 12px;
312+
min-width: $clickable-area;
292313
max-width: 100%;
293314
border-radius: var(--border-radius-pill);
294315
align-items: center;
295316
display: inline-flex;
317+
justify-content: center;
296318
297319
> span {
298320
overflow: hidden;

0 commit comments

Comments
 (0)