Skip to content

Commit

Permalink
Merge pull request #771 from gympass/EUEG-3194
Browse files Browse the repository at this point in the history
[EUEG-3194] Update Dialog component to use the correct font-weight
  • Loading branch information
evilamaior authored Mar 22, 2024
2 parents 4e633d4 + 90e0850 commit b479004
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 93 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<BottomSheet /> should match snapshot 1`] = `
.c4 {
margin-bottom: 24px;
color: #231B22;
font-size: 24px;
font-weight: 500;
text-align: center;
}
.c6 {
margin-bottom: 32px;
color: #6B6B78;
font-size: 16px;
font-weight: 400;
text-align: center;
}
.c8 {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -91,6 +75,30 @@ exports[`<BottomSheet /> should match snapshot 1`] = `
fill: #FFFFFF;
}
.c4 {
margin: 0;
padding: 0;
font-size: 24px;
line-height: 32px;
color: #231B22;
font-family: Rubik;
font-weight: 500;
margin-bottom: 24px;
text-align: center;
}
.c6 {
margin: 0;
padding: 0;
font-size: 16px;
line-height: 24px;
color: #231B22;
font-family: Rubik;
font-weight: 400;
margin-bottom: 32px;
text-align: center;
}
.c1 {
padding: 16px 16px 16px 16px;
box-shadow: 0 2px 4px -1px rgba(152,152,166,0.2),0 4px 5px 0px rgba(152,152,166,0.14),0 1px 10px 0px rgba(152,152,166,0.12);
Expand Down Expand Up @@ -199,16 +207,14 @@ exports[`<BottomSheet /> should match snapshot 1`] = `
>
<header
class="c4 c5"
color="text.primary"
>
Title
</header>
<div
<p
class="c6 c7"
color="text.secondary"
>
Subtitle
</div>
</p>
<footer
class="c8 c9"
d="flex"
Expand Down
13 changes: 2 additions & 11 deletions packages/yoga/src/Dialog/web/Content.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
import React from 'react';
import Box from '../../Box';
import Text from '../../Text';

const Content = props => (
<Box
ta="center"
color="text.secondary"
fw="regular"
fs="medium"
mb="xlarge"
{...props}
/>
);
const Content = props => <Text.Body1 ta="center" mb="xlarge" {...props} />;

Content.displayName = 'Dialog.Content';

Expand Down
12 changes: 2 additions & 10 deletions packages/yoga/src/Dialog/web/Header.jsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
import React from 'react';
import Box from '../../Box';
import Text from '../../Text';

const Header = props => (
<Box
as="header"
ta="center"
color="text.primary"
fw="medium"
fs="xlarge"
mb="large"
{...props}
/>
<Text.H4 bold as="header" ta="center" mb="large" {...props} />
);

Header.displayName = 'Dialog.Header';
Expand Down
94 changes: 53 additions & 41 deletions packages/yoga/src/Dialog/web/__snapshots__/Dialog.test.jsx.snap
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Dialog /> should match snapshot 1`] = `
.c3 {
margin-bottom: 24px;
color: #231B22;
font-size: 24px;
font-weight: 500;
text-align: center;
}
.c4 {
margin-bottom: 32px;
color: #6B6B78;
font-size: 16px;
font-weight: 400;
text-align: center;
}
.c5 {
display: -webkit-box;
display: -webkit-flex;
Expand Down Expand Up @@ -91,6 +75,30 @@ exports[`<Dialog /> should match snapshot 1`] = `
fill: #FFFFFF;
}
.c3 {
margin: 0;
padding: 0;
font-size: 24px;
line-height: 32px;
color: #231B22;
font-family: Rubik;
font-weight: 500;
margin-bottom: 24px;
text-align: center;
}
.c4 {
margin: 0;
padding: 0;
font-size: 16px;
line-height: 24px;
color: #231B22;
font-family: Rubik;
font-weight: 400;
margin-bottom: 32px;
text-align: center;
}
.c1 {
padding: 16px 16px 16px 16px;
box-shadow: 0 2px 4px -1px rgba(152,152,166,0.2),0 4px 5px 0px rgba(152,152,166,0.14),0 1px 10px 0px rgba(152,152,166,0.12);
Expand Down Expand Up @@ -152,16 +160,14 @@ exports[`<Dialog /> should match snapshot 1`] = `
>
<header
class="c3"
color="text.primary"
>
Title
</header>
<div
<p
class="c4"
color="text.secondary"
>
Subtitle
</div>
</p>
<footer
class="c5"
d="flex"
Expand All @@ -182,23 +188,7 @@ exports[`<Dialog /> should match snapshot 1`] = `
exports[`<Dialog /> should match snapshot with close button 1`] = `
<body>
<div />
.c7 {
margin-bottom: 24px;
color: #231B22;
font-size: 24px;
font-weight: 500;
text-align: center;
}
.c8 {
margin-bottom: 32px;
color: #6B6B78;
font-size: 16px;
font-weight: 400;
text-align: center;
}
.c9 {
.c9 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand Down Expand Up @@ -381,6 +371,30 @@ exports[`<Dialog /> should match snapshot with close button 1`] = `
transition: fill 0.2s;
}
.c7 {
margin: 0;
padding: 0;
font-size: 24px;
line-height: 32px;
color: #231B22;
font-family: Rubik;
font-weight: 500;
margin-bottom: 24px;
text-align: center;
}
.c8 {
margin: 0;
padding: 0;
font-size: 16px;
line-height: 24px;
color: #231B22;
font-family: Rubik;
font-weight: 400;
margin-bottom: 32px;
text-align: center;
}
.c1 {
padding: 16px 16px 16px 16px;
box-shadow: 0 2px 4px -1px rgba(152,152,166,0.2),0 4px 5px 0px rgba(152,152,166,0.14),0 1px 10px 0px rgba(152,152,166,0.12);
Expand Down Expand Up @@ -471,16 +485,14 @@ exports[`<Dialog /> should match snapshot with close button 1`] = `
</div>
<header
class="c7"
color="text.primary"
>
Title
</header>
<div
<p
class="c8"
color="text.secondary"
>
Subtitle
</div>
</p>
<footer
class="c9"
d="flex"
Expand Down
25 changes: 14 additions & 11 deletions packages/yoga/src/Drawer/web/__snapshots__/Drawer.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ exports[`<Drawer /> should match snapshot 1`] = `
color: #231B22;
}
.c5 {
margin-bottom: 32px;
color: #6B6B78;
font-size: 16px;
font-weight: 400;
text-align: center;
}
.c7 {
width: 100%;
display: -webkit-box;
Expand Down Expand Up @@ -84,6 +76,18 @@ exports[`<Drawer /> should match snapshot 1`] = `
fill: #FFFFFF;
}
.c5 {
margin: 0;
padding: 0;
font-size: 16px;
line-height: 24px;
color: #231B22;
font-family: Rubik;
font-weight: 400;
margin-bottom: 32px;
text-align: center;
}
.c1 {
padding: 16px 16px 16px 16px;
box-shadow: 0 2px 4px -1px rgba(152,152,166,0.2),0 4px 5px 0px rgba(152,152,166,0.14),0 1px 10px 0px rgba(152,152,166,0.12);
Expand Down Expand Up @@ -180,12 +184,11 @@ exports[`<Drawer /> should match snapshot 1`] = `
>
Title
</header>
<div
<p
class="c5 c6"
color="text.secondary"
>
Subtitle
</div>
</p>
<footer
class="c7"
d="flex"
Expand Down

0 comments on commit b479004

Please sign in to comment.