Skip to content

Commit 6915bbb

Browse files
committed
styles: refactor remaining text styles
1 parent 7e9dd6e commit 6915bbb

File tree

7 files changed

+22
-54
lines changed

7 files changed

+22
-54
lines changed

app/src/components/common/PageHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { observer } from 'mobx-react-lite';
33
import { styled } from 'components/theme';
44
import { ArrowLeft, Icon } from './icons';
5-
import { PageTitle } from './text';
5+
import { HeaderThree } from './text';
66

77
const Styled = {
88
Wrapper: styled.div`
@@ -66,7 +66,7 @@ const PageHeader: React.FC<Props> = ({
6666
)}
6767
</Left>
6868
<Center>
69-
<PageTitle>{title}</PageTitle>
69+
<HeaderThree>{title}</HeaderThree>
7070
</Center>
7171
<Right>
7272
{onHistoryClick && <ActionIcon icon="clock" onClick={onHistoryClick} />}

app/src/components/common/Radio.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { ReactNode } from 'react';
22
import { styled } from 'components/theme';
3-
import { SmallText } from './text';
3+
import { Small } from './text';
44

55
const Styled = {
66
Wrapper: styled.div<{ right?: boolean }>`
@@ -43,7 +43,7 @@ const Radio: React.FC<Props> = ({ text, description, active, right, onClick }) =
4343
<RadioBlock active={active} onClick={onClick} role="switch" aria-checked={!!active}>
4444
{text}
4545
</RadioBlock>
46-
<SmallText>{description}</SmallText>
46+
<Small>{description}</Small>
4747
</Wrapper>
4848
);
4949
};

app/src/components/common/Tile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const Tile: React.FC<Props> = ({ title, text, onMaximizeClick, children }) => {
5757
return (
5858
<TileWrap>
5959
<Header>
60-
<HeaderFour>{title}</HeaderFour>
60+
<HeaderFour marginless>{title}</HeaderFour>
6161
{onMaximizeClick && <MaximizeIcon title="maximize" onClick={onMaximizeClick} />}
6262
</Header>
6363
{text ? <Text>{text}</Text> : children}

app/src/components/common/text.tsx

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import { styled } from 'components/theme';
22

3-
interface BlockProps {
4-
block?: boolean;
5-
}
6-
73
interface HeaderProps {
84
marginless?: boolean;
95
}
@@ -21,7 +17,7 @@ export const HeaderTwo = styled.h2`
2117
`;
2218

2319
export const HeaderThree = styled.h3`
24-
font-family: ${props => props.theme.fonts.open.regular};
20+
font-family: ${props => props.theme.fonts.open.light};
2521
font-size: ${props => props.theme.sizes.l};
2622
line-height: 30px;
2723
letter-spacing: 2.7px;
@@ -37,6 +33,11 @@ export const HeaderFour = styled.h4<HeaderProps>`
3733
margin-bottom: ${props => (props.marginless ? '0' : '0.5rem')};
3834
`;
3935

36+
export const HeaderFive = styled.h5`
37+
font-family: ${props => props.theme.fonts.open.bold};
38+
font-size: ${props => props.theme.sizes.m};
39+
`;
40+
4041
export const Small = styled.p`
4142
font-size: ${props => props.theme.sizes.s};
4243
line-height: 19px;
@@ -46,35 +47,3 @@ export const Jumbo = styled.span`
4647
font-size: ${props => props.theme.sizes.xl};
4748
line-height: 38px;
4849
`;
49-
50-
export const SmallText = styled.span<BlockProps>`
51-
${props => props.block && 'display: block;'}
52-
font-size: ${props => props.theme.sizes.s};
53-
letter-spacing: 0.22px;
54-
`;
55-
56-
export const LargeText = styled.span<BlockProps>`
57-
${props => props.block && 'display: block;'}
58-
font-size: ${props => props.theme.sizes.l};
59-
letter-spacing: 0.43px;
60-
`;
61-
62-
export const XLargeText = styled.span<BlockProps>`
63-
${props => props.block && 'display: block;'}
64-
font-size: ${props => props.theme.sizes.xl};
65-
letter-spacing: 0.43px;
66-
`;
67-
68-
export const PageTitle = styled.h2`
69-
font-family: ${props => props.theme.fonts.open.light};
70-
font-size: ${props => props.theme.sizes.l};
71-
text-align: center;
72-
text-transform: uppercase;
73-
letter-spacing: 2.7px;
74-
line-height: 30px;
75-
`;
76-
77-
export const H3Text = styled.h3`
78-
font-family: ${props => props.theme.fonts.open.bold};
79-
font-size: ${props => props.theme.sizes.m};
80-
`;

app/src/components/loop/LoopHistory.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { observer } from 'mobx-react-lite';
33
import { useStore } from 'store';
44
import { Column, Row } from 'components/common/grid';
5-
import { SmallText } from 'components/common/text';
5+
import { Small } from 'components/common/text';
66
import Unit from 'components/common/Unit';
77
import { styled } from 'components/theme';
88
import SwapDot from './SwapDot';
@@ -11,9 +11,11 @@ const Styled = {
1111
RightColumn: styled(Column)`
1212
text-align: right;
1313
`,
14-
SmallText: styled(SmallText)`
14+
SmallText: styled(Small)`
15+
display: inline-block;
1516
line-height: 1;
1617
margin-left: 10px;
18+
margin-bottom: 0;
1719
`,
1820
};
1921

app/src/components/loop/swap/StepSummary.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { usePrefixedTranslation } from 'hooks';
33
import { useStore } from 'store';
44
import { Pill } from 'components/common/base';
5-
import { H3Text, HeaderFour, SmallText } from 'components/common/text';
5+
import { HeaderFive, HeaderFour, Small } from 'components/common/text';
66
import { styled } from 'components/theme';
77

88
const Styled = {
@@ -13,10 +13,7 @@ const Styled = {
1313
justify-content: space-between;
1414
max-width: 240px;
1515
`,
16-
Heading: styled(H3Text)`
17-
margin-top: 10px;
18-
`,
19-
Description: styled(SmallText)`
16+
Description: styled(Small)`
2017
opacity: 0.5;
2118
`,
2219
Channels: styled.div`
@@ -34,12 +31,12 @@ const StepSummary: React.FC<Props> = ({ title, heading, description }) => {
3431
const { l } = usePrefixedTranslation('cmps.loop.swap.StepSummary');
3532
const { buildSwapStore } = useStore();
3633

37-
const { Wrapper, Heading, Description } = Styled;
34+
const { Wrapper, Description } = Styled;
3835
return (
3936
<Wrapper>
4037
<div>
4138
<HeaderFour>{title}</HeaderFour>
42-
<Heading>{heading}</Heading>
39+
<HeaderFive>{heading}</HeaderFive>
4340
<Description>{description}</Description>
4441
</div>
4542
<div>

app/src/components/loop/swap/SwapReviewStep.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { observer } from 'mobx-react-lite';
33
import { usePrefixedTranslation } from 'hooks';
44
import { useStore } from 'store';
5-
import { HeaderFour, XLargeText } from 'components/common/text';
5+
import { HeaderFour, Jumbo } from 'components/common/text';
66
import Unit from 'components/common/Unit';
77
import { styled } from 'components/theme';
88
import StepButtons from './StepButtons';
@@ -70,9 +70,9 @@ const SwapReviewStep: React.FC = () => {
7070
<Divider />
7171
<InvoiceRow>
7272
<HeaderFour marginless>{l('total')}</HeaderFour>
73-
<XLargeText>
73+
<Jumbo>
7474
<Unit sats={buildSwapStore.invoiceTotal} />
75-
</XLargeText>
75+
</Jumbo>
7676
</InvoiceRow>
7777
</div>
7878
<StepButtons

0 commit comments

Comments
 (0)