-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(breadcrumbs): fix story configuration of BreadcrumbItem (#1246)
* fix: href on link * fix(breadcrumbs): fix story configuration of BreadcrumbItem * fix whitespace * correct url -> href * Revert "fix: href on link" This reverts commit 5db2f406db0ffb7160151c320f8b096607ce4390. * fix markdown lint --------- Co-authored-by: Sanjeev Suresh <ssuresh@dialpad.com>
- Loading branch information
1 parent
d90d890
commit 3ce325d
Showing
4 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { createTemplateFromVueFile } from '@/common/storybook_utils'; | ||
import DtBreadcrumbItem from './breadcrumb_item.vue'; | ||
|
||
import DtBreadcrumbItemDefaultTemplate from './breadcrumb_item_default.story.vue'; | ||
|
||
// Default Prop Values | ||
export const argsData = { | ||
href: '#', | ||
label: 'Breadcrumb Item', | ||
selected: false, | ||
}; | ||
|
||
export const argTypesData = { | ||
}; | ||
|
||
// Story Collection | ||
export default { | ||
title: 'Components/Breadcrumbs', | ||
component: DtBreadcrumbItem, | ||
args: argsData, | ||
argTypes: argTypesData, | ||
excludeStories: /.*Data$/, | ||
}; | ||
|
||
// Templates | ||
const DefaultTemplate = (args, { argTypes }) => | ||
createTemplateFromVueFile(args, argTypes, DtBreadcrumbItemDefaultTemplate); | ||
|
||
export const BreadcrumbItem = { | ||
render: DefaultTemplate, | ||
args: {}, | ||
parameters: { | ||
a11y: { | ||
config: { | ||
rules: [ | ||
{ | ||
id: 'listitem', | ||
enabled: false, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<dt-breadcrumb-item | ||
:inverted="inverted" | ||
:selected="selected" | ||
:label="label" | ||
:href="href" | ||
/> | ||
</template> | ||
|
||
<script> | ||
import DtBreadcrumbItem from './breadcrumb_item.vue'; | ||
export default { | ||
name: 'DtBreadcrumbItemDefault', | ||
components: { DtBreadcrumbItem }, | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters