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

🐞[RTN-858] - Fix width and height on Buttons inside Heading component #737

Merged
merged 3 commits into from
Feb 23, 2024
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
4 changes: 2 additions & 2 deletions packages/yoga/src/Heading/Heading.theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ const Heading = ({ spacing, colors }) => ({
height: spacing.xxxlarge,
button: {
color: colors.secondary,
width: spacing.xxlarge + spacing.xxxsmall,
height: spacing.xxlarge + spacing.xxxsmall,
width: spacing.xxlarge + spacing.xxsmall,
height: spacing.xxlarge + spacing.xxsmall,
backgroundWidth: spacing.xxlarge,
backgroundHeight: spacing.xxlarge,
background: colors.elements.lineAndBorders,
Expand Down
1 change: 1 addition & 0 deletions packages/yoga/src/Heading/web/StyledHeading.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const StyledHeading = styled.header`
return css`
background: ${heading.background};
padding: ${heading.padding.vertical}px ${heading.padding.horizontal}px;
min-height: ${heading.height}px;
width: 100%;
display: flex;
justify-content: space-between;
Expand Down
53 changes: 29 additions & 24 deletions packages/yoga/src/Heading/web/__snapshots__/Heading.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ exports[`<Heading /> should match snapshot no padding 1`] = `
.c0 {
background: #FFFFFF;
padding: 4px 16px;
min-height: 56px;
width: 100%;
display: -webkit-box;
display: -webkit-flex;
Expand All @@ -199,9 +200,9 @@ exports[`<Heading /> should match snapshot no padding 1`] = `
.c2 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c2:active {
Expand Down Expand Up @@ -241,9 +242,9 @@ exports[`<Heading /> should match snapshot no padding 1`] = `
.c9 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c9:active {
Expand Down Expand Up @@ -519,6 +520,7 @@ exports[`<Heading /> should match snapshot with all components 1`] = `
.c0 {
background: #FFFFFF;
padding: 4px 16px;
min-height: 56px;
width: 100%;
display: -webkit-box;
display: -webkit-flex;
Expand All @@ -537,9 +539,9 @@ exports[`<Heading /> should match snapshot with all components 1`] = `
.c2 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c2:active {
Expand Down Expand Up @@ -579,9 +581,9 @@ exports[`<Heading /> should match snapshot with all components 1`] = `
.c9 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c9:active {
Expand Down Expand Up @@ -790,6 +792,7 @@ exports[`<Heading /> should match snapshot with back button 1`] = `
.c0 {
background: #FFFFFF;
padding: 4px 16px;
min-height: 56px;
width: 100%;
display: -webkit-box;
display: -webkit-flex;
Expand All @@ -806,16 +809,16 @@ exports[`<Heading /> should match snapshot with back button 1`] = `
}

.c7 {
width: 44px;
height: 44px;
width: 48px;
height: 48px;
}

.c2 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c2:active {
Expand Down Expand Up @@ -925,6 +928,7 @@ exports[`<Heading /> should match snapshot with title 1`] = `
.c0 {
background: #FFFFFF;
padding: 4px 16px;
min-height: 56px;
width: 100%;
display: -webkit-box;
display: -webkit-flex;
Expand All @@ -941,8 +945,8 @@ exports[`<Heading /> should match snapshot with title 1`] = `
}

.c1 {
width: 44px;
height: 44px;
width: 48px;
height: 48px;
}

@media (min-width:769px) {
Expand Down Expand Up @@ -1098,6 +1102,7 @@ exports[`<Heading /> should match snapshot with title and back button 1`] = `
.c0 {
background: #FFFFFF;
padding: 4px 16px;
min-height: 56px;
width: 100%;
display: -webkit-box;
display: -webkit-flex;
Expand All @@ -1114,16 +1119,16 @@ exports[`<Heading /> should match snapshot with title and back button 1`] = `
}

.c8 {
width: 44px;
height: 44px;
width: 48px;
height: 48px;
}

.c2 {
background-color: transparent;
box-shadow: none;
max-width: 44px;
min-width: 44px;
height: 44px;
max-width: 48px;
min-width: 48px;
height: 48px;
}

.c2:active {
Expand Down
Loading