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

Breadcrumb: add exact prop and fix style #3654

Merged
merged 3 commits into from
Jan 13, 2023
Merged
Changes from 2 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
22 changes: 20 additions & 2 deletions src/components/NcBreadcrumb/NcBreadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ This component is meant to be used inside a Breadcrumbs component.
@dragleave="dragLeave">
<element :is="tag"
v-if="(title || icon) && !$slots.default"
:exact="exact"
:to="to"
:href="href">
<!-- @slot Slot for passing a material design icon. Precedes the icon and title prop. -->
Expand Down Expand Up @@ -89,42 +90,57 @@ export default {
type: String,
required: true,
},

/**
* The router-link to prop [https://router.vuejs.org/api/#to](https://router.vuejs.org/api/#to)
* If set, the breadcrumbs will be rendered by router-link.
* Route Location the link should navigate to when clicked on.
* @see https://v3.router.vuejs.org/api/#to
*/
to: {
type: [String, Object],
default: undefined,
},

/**
* Route Location the link should navigate to when clicked on.
skjnldsv marked this conversation as resolved.
Show resolved Hide resolved
* @see https://v3.router.vuejs.org/api/#exact
*/
exact: {
type: Boolean,
default: false,
},

/**
* Set this prop if your app doesn't use vue-router, breadcrumbs will show as normal links.
*/
href: {
type: String,
default: undefined,
},

/**
* Set a css icon-class to show an icon instead of the title text.
*/
icon: {
type: String,
default: '',
},

/**
* Disable dropping on this breadcrumb.
*/
disableDrop: {
type: Boolean,
default: false,
},

/**
* Force the actions to display in a three dot menu
*/
forceMenu: {
type: Boolean,
default: false,
},

/**
* Open state of the Actions menu
*/
Expand Down Expand Up @@ -289,10 +305,12 @@ export default {
overflow: hidden;
color: var(--color-text-maxcontrast);
padding: 12px;
min-width: $clickable-area;
max-width: 100%;
border-radius: var(--border-radius-pill);
align-items: center;
display: inline-flex;
justify-content: center;

> span {
overflow: hidden;
Expand Down