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

fix: Removed unnecessary code in Grid Component #633

Merged
merged 1 commit into from
Jan 11, 2022
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
180 changes: 0 additions & 180 deletions components/grid/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,6 @@ exports[`Grid all breakpoint values should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 0;
max-width: 4.166666666666667%;
flex-basis: 4.166666666666667%;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 0;
Expand Down Expand Up @@ -103,15 +94,6 @@ exports[`Grid all breakpoint values should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 0;
max-width: 4.166666666666667%;
flex-basis: 4.166666666666667%;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 0;
Expand Down Expand Up @@ -180,15 +162,6 @@ exports[`Grid css value should be passed through 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -253,15 +226,6 @@ exports[`Grid css value should be passed through 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -330,15 +294,6 @@ exports[`Grid decimal spacing should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -403,15 +358,6 @@ exports[`Grid decimal spacing should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -480,15 +426,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -553,15 +490,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -626,15 +554,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -699,15 +618,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -772,15 +682,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -845,15 +746,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -918,15 +810,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -991,15 +874,6 @@ exports[`Grid nested components should be supported 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1068,15 +942,6 @@ exports[`Grid should render correctly 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1141,15 +1006,6 @@ exports[`Grid should render correctly 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1214,15 +1070,6 @@ exports[`Grid should render correctly 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1291,15 +1138,6 @@ exports[`Grid should work correctly when size exceeds 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 0;
max-width: 100%;
flex-basis: 100%;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1364,15 +1202,6 @@ exports[`Grid should work correctly when size exceeds 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 0;
max-width: 0;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down Expand Up @@ -1437,15 +1266,6 @@ exports[`Grid should work correctly when size exceeds 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down
9 changes: 0 additions & 9 deletions components/grid/basic-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@ const GridBasicItem: React.FC<React.PropsWithChildren<GridBasicItemProps>> = ({
${layout.xs.display}
}

@media only screen and (max-width: ${theme.breakpoints.xs.max}) {
.xs {
flex-grow: ${layout.xs.grow};
max-width: ${layout.xs.width};
flex-basis: ${layout.xs.basis};
${layout.xs.display}
}
}

@media only screen and (min-width: ${theme.breakpoints.sm.min}) {
.sm {
flex-grow: ${layout.sm.grow};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,6 @@ exports[`Select Multiple should render correctly 1`] = `
display: inherit;
}

@media only screen and (max-width: 650px) {
.xs {
flex-grow: 1;
max-width: 100%;
flex-basis: 0;
display: inherit;
}
}

@media only screen and (min-width: 650px) {
.sm {
flex-grow: 1;
Expand Down