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

feat(PPDSC-2696): set default padding block to 'space000' for breadCrumbItem #565

Merged
merged 3 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports[`BreadcrumbItem renders selected menu item with aria attributes 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -229,6 +230,7 @@ exports[`BreadcrumbItem renders with default props 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -404,6 +406,7 @@ exports[`BreadcrumbItem renders with overrides 1`] = `
min-width: 10px;
min-height: 11px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -541,6 +544,7 @@ exports[`Breadcrumbs renders in large size 1`] = `
min-width: 120px;
min-height: 64px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -837,6 +841,7 @@ exports[`Breadcrumbs renders in medium size 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -1133,6 +1138,7 @@ exports[`Breadcrumbs renders in small size 1`] = `
min-width: 64px;
min-height: 32px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -1429,6 +1435,7 @@ exports[`Breadcrumbs renders with default props 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -1729,6 +1736,7 @@ exports[`Breadcrumbs renders with logical prop overrides 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -2024,6 +2032,7 @@ exports[`Breadcrumbs renders with separator icon as overrides 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -2319,6 +2328,7 @@ exports[`Breadcrumbs renders with separator overrides with TextBlock component 1
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down Expand Up @@ -2548,6 +2558,7 @@ exports[`Breadcrumbs renders with showTrailingSeparator 1`] = `
min-width: 80px;
min-height: 48px;
padding-inline: 0;
padding-block: 0;
box-sizing: border-box;
-webkit-text-decoration: none;
text-decoration: none;
Expand Down
28 changes: 22 additions & 6 deletions src/breadcrumbs/__tests__/breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,17 @@ export const StoryLogicalProps = () => (
overrides={{paddingBlock: 'space050'}}
aria-label="padding-overrides"
>
<BreadcrumbItem href={href}>Breadcrumb item</BreadcrumbItem>
<BreadcrumbItem href={href}>Breadcrumb item</BreadcrumbItem>
<BreadcrumbItem selected href={href}>
<BreadcrumbItem href={href} overrides={{paddingInline: 'space020'}}>
Breadcrumb item
</BreadcrumbItem>
<BreadcrumbItem href={href} overrides={{paddingInline: 'space020'}}>
Breadcrumb item
</BreadcrumbItem>
<BreadcrumbItem
selected
href={href}
overrides={{paddingInline: 'space020'}}
>
Breadcrumb item
</BreadcrumbItem>
</Breadcrumbs>
Expand All @@ -233,9 +241,17 @@ export const StoryLogicalProps = () => (
overrides={{marginBlock: 'space050'}}
aria-label="margin-overrides"
>
<BreadcrumbItem href={href}>Breadcrumb item</BreadcrumbItem>
<BreadcrumbItem href={href}>Breadcrumb item</BreadcrumbItem>
<BreadcrumbItem selected href={href}>
<BreadcrumbItem href={href} overrides={{marginInline: 'space020'}}>
Breadcrumb item
</BreadcrumbItem>
<BreadcrumbItem href={href} overrides={{marginInline: 'space020'}}>
Breadcrumb item
</BreadcrumbItem>
<BreadcrumbItem
selected
href={href}
overrides={{marginInline: 'space020'}}
>
Breadcrumb item
</BreadcrumbItem>
</Breadcrumbs>
Expand Down
3 changes: 3 additions & 0 deletions src/breadcrumbs/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ export default {
typographyPreset: 'utilityButton010',
stylePreset: 'breadcrumbItem',
paddingInline: 'space000',
paddingBlock: 'space000',
},
medium: {
typographyPreset: 'utilityButton020',
stylePreset: 'breadcrumbItem',
paddingInline: 'space000',
paddingBlock: 'space000',
},
large: {
typographyPreset: 'utilityButton030',
stylePreset: 'breadcrumbItem',
paddingInline: 'space000',
paddingBlock: 'space000',
},
},
breadcrumbs: {
Expand Down
3 changes: 3 additions & 0 deletions src/theme/__tests__/__snapshots__/theme.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1521,16 +1521,19 @@ Object {
},
"breadcrumbItem": Object {
"large": Object {
"paddingBlock": "space000",
"paddingInline": "space000",
"stylePreset": "breadcrumbItem",
"typographyPreset": "utilityButton030",
},
"medium": Object {
"paddingBlock": "space000",
"paddingInline": "space000",
"stylePreset": "breadcrumbItem",
"typographyPreset": "utilityButton020",
},
"small": Object {
"paddingBlock": "space000",
"paddingInline": "space000",
"stylePreset": "breadcrumbItem",
"typographyPreset": "utilityButton010",
Expand Down