Skip to content

Commit

Permalink
chore(Modal, Sidesheet): removes unnecessary div wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-kumawat authored and satyamyadav committed Jan 27, 2021
1 parent b1bf4ad commit 71847df
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand All @@ -106,9 +104,7 @@ exports[`Dialog component
<body
style="overflow: hidden;"
>
<div>
<div />
</div>
<div />
<div
class="Modal-wrapper"
>
Expand Down Expand Up @@ -289,9 +285,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -389,9 +383,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -489,9 +481,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -589,9 +579,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -689,9 +677,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -789,9 +775,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -889,9 +873,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -989,9 +971,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -1089,9 +1069,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -1189,9 +1167,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -1289,9 +1265,7 @@ exports[`Dialog component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down
4 changes: 2 additions & 2 deletions core/components/molecules/modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ class Modal extends React.Component<ModalProps, ModalState> {
);

return (
<div>
<>
{WrapperElement}
<Backdrop open={this.state.open} />
</div>
</>
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ exports[`Modal component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -122,9 +120,7 @@ exports[`Modal component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -186,9 +182,7 @@ exports[`Modal component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down Expand Up @@ -255,9 +249,7 @@ exports[`Modal component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand All @@ -272,9 +264,7 @@ exports[`Modal component
<body
style="overflow: hidden;"
>
<div>
<div />
</div>
<div />
<div
class="Modal-wrapper"
>
Expand Down Expand Up @@ -388,9 +378,7 @@ exports[`Modal component
</div>
</div>
</div>
<div>
<div />
</div>
<div />
<div
class="Backdrop Backdrop--open Backdrop-animation--open"
data-layer="true"
Expand Down
4 changes: 2 additions & 2 deletions core/components/molecules/sidesheet/Sidesheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ class Sidesheet extends React.Component<SidesheetProps, SidesheetState> {
);

return (
<div>
<>
{WrapperElement}
<Backdrop open={this.state.open} />
</div>
</>
);
}
}
Expand Down
2 changes: 0 additions & 2 deletions core/utils/__tests__/__snapshots__/TS.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,6 @@ exports[`TS renders children 1`] = `
Hello World!
</span>
</span>
<div />
<div />
<div
class="Modal-header"
data-test="DesignSystem-ModalHeader"
Expand Down

0 comments on commit 71847df

Please sign in to comment.