Skip to content

Commit 59d4021

Browse files
committed
fix: remove top padding from footer when overflow evaluates to false
1 parent fcfe7a0 commit 59d4021

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

src/components/Common/UI/Modal/Modal.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,13 @@
9393
bottom: toRem(-24);
9494
display: flex;
9595
gap: toRem(12);
96-
padding-top: toRem(24);
9796
padding-left: toRem(24);
9897
padding-right: toRem(24);
9998
padding-bottom: toRem(24);
100-
border-top: 1px solid var(--g-colorBorder);
10199
}
102100

103101
.footerFixed {
102+
border-top: 1px solid var(--g-colorBorder);
104103
padding: toRem(24);
105104
flex: 0 0 auto;
106105
background-color: var(--g-colorBody);

src/components/Common/UI/Modal/Modal.stories.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ export const BasicModal = () => {
3636
<Components.Heading as="h2" styledAs="h3">
3737
Basic Modal
3838
</Components.Heading>
39-
<Components.Text>This is a simple modal with content and a footer.</Components.Text>
39+
<Components.Text variant="supporting">
40+
This is a simple modal with content and a footer.
41+
</Components.Text>
4042
</Components.Modal>
4143
</>
4244
)
@@ -85,7 +87,9 @@ export const CustomFooter = () => {
8587
<Components.Heading as="h2" styledAs="h3">
8688
Custom Footer
8789
</Components.Heading>
88-
<Components.Text>This modal has a custom footer with multiple buttons.</Components.Text>
90+
<Components.Text variant="supporting">
91+
This modal has a custom footer with multiple buttons.
92+
</Components.Text>
8993
</Components.Modal>
9094
</>
9195
)
@@ -122,36 +126,36 @@ export const LongContent = () => {
122126
<Components.Heading as="h2" styledAs="h3">
123127
Modal with Scrolling Content
124128
</Components.Heading>
125-
<Components.Text>
129+
<Components.Text variant="supporting">
126130
This modal contains a lot of content to demonstrate scrolling behavior when the content
127131
exceeds the viewport height.
128132
</Components.Text>
129-
<Components.Text>
133+
<Components.Text variant="supporting">
130134
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
131135
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
132136
ullamco laboris nisi ut aliquip ex ea commodo consequat.
133137
</Components.Text>
134-
<Components.Text>
138+
<Components.Text variant="supporting">
135139
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
136140
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
137141
deserunt mollit anim id est laborum.
138142
</Components.Text>
139-
<Components.Text>
143+
<Components.Text variant="supporting">
140144
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
141145
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
142146
ullamco laboris nisi ut aliquip ex ea commodo consequat.
143147
</Components.Text>
144-
<Components.Text>
148+
<Components.Text variant="supporting">
145149
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
146150
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
147151
deserunt mollit anim id est laborum.
148152
</Components.Text>
149-
<Components.Text>
153+
<Components.Text variant="supporting">
150154
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt
151155
ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
152156
ullamco laboris nisi ut aliquip ex ea commodo consequat.
153157
</Components.Text>
154-
<Components.Text>
158+
<Components.Text variant="supporting">
155159
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat
156160
nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
157161
deserunt mollit anim id est laborum.
@@ -193,7 +197,7 @@ export const BackdropClick = () => {
193197
<Components.Heading as="h2" styledAs="h3">
194198
Click Backdrop to Close
195199
</Components.Heading>
196-
<Components.Text>
200+
<Components.Text variant="supporting">
197201
This modal can be closed by clicking the backdrop area outside the modal content, or by
198202
pressing the Escape key.
199203
</Components.Text>
@@ -225,7 +229,7 @@ export const NoFooter = () => {
225229
<Components.Heading as="h2" styledAs="h3">
226230
Modal without Footer
227231
</Components.Heading>
228-
<Components.Text>
232+
<Components.Text variant="supporting">
229233
This modal has no footer. You can close it by clicking the backdrop or pressing Escape.
230234
</Components.Text>
231235
</Components.Modal>

0 commit comments

Comments
 (0)