Skip to content

Commit 4147c54

Browse files
committed
Style fixes
1 parent 3729968 commit 4147c54

File tree

8 files changed

+60
-16
lines changed

8 files changed

+60
-16
lines changed

src/components/action-button/index.scss

+9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ a:link, a:visited, a:hover, a:active {
2121
.action-button-text {
2222
color: white;
2323
}
24+
25+
.action-button-text-sm {
26+
color: white;
27+
font-size: 15px;
28+
}
2429
}
2530

2631

32+
.action-button-container-sm {
33+
padding: 10px 20px
34+
}
35+

src/components/action-button/index.tsx

+18-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,24 @@ import { ReactComponent as CopyIcon } from '../../icons/copy.svg';
44

55
import './index.scss';
66

7+
export type TActionButtonSize = 'sm' | 'lg' | undefined;
8+
79
export default ({
810
children,
911
copyText,
1012
onClick,
1113
href,
1214
Icon,
13-
disabled
15+
disabled,
16+
size
1417
}: {
1518
children: string;
1619
copyText?: string;
1720
onClick?: () => void;
1821
href?: string;
1922
Icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement> & { title?: string }>;
2023
disabled?: boolean;
24+
size?: TActionButtonSize;
2125
}): JSX.Element => {
2226
const [isCopied, setIsCopied] = useState(false);
2327

@@ -34,10 +38,21 @@ export default ({
3438
ButtonIcon = CopyIcon;
3539
}
3640

41+
// TODO use size
42+
43+
let containerClass = 'action-button-container ';
44+
let buttonTextClass = 'action-button-text '
45+
if (size) {
46+
containerClass += `action-button-container-${size}`
47+
buttonTextClass += `action-button-text-${size}`;
48+
}
49+
3750
const button = (
38-
<div className={'action-button-container'} onClick={!disabled ? onClick : undefined}>
51+
<div className={containerClass} onClick={!disabled ? onClick : undefined}>
3952
{ButtonIcon ? <ButtonIcon className={'action-button-icon'} /> : null}
40-
<span className={'action-button-text'}>{isCopied ? 'Copied!' : children}</span>
53+
<span className={buttonTextClass}>
54+
{isCopied ? 'Copied!' : children}
55+
</span>
4156
</div>
4257
);
4358

src/components/icon-ring/index.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
.icon-ring-pending {
2626
@extend .icon-ring;
2727
background: rgba(255, 210, 0, 0.16);
28-
border: 2px solid #FFD200;
28+
border: 2px solid #FFAE00;
2929
box-shadow: 0px 1px 10px rgba(255, 210, 0, 0.3), 0px 4px 116px rgba(255, 210, 0, 0.4);
3030
}
3131

src/components/support-link/index.tsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
import React from 'react';
2-
import ActionButton from '../action-button';
2+
import ActionButton, { TActionButtonSize } from '../action-button';
33
import './index.scss';
44
import { supportHref } from '../../settings';
55

66
// TODO pull current order ID from store
7-
export default ({ children, orderId }: { children?: string; orderId?: string }): JSX.Element => {
8-
return <ActionButton href={supportHref(orderId)}>{children ?? 'Contact Support'}</ActionButton>;
7+
export default ({
8+
children,
9+
orderId,
10+
size
11+
}: {
12+
children?: string;
13+
orderId?: string;
14+
size?: TActionButtonSize;
15+
}): JSX.Element => {
16+
return (
17+
<ActionButton href={supportHref(orderId)} size={size}>
18+
{children ?? 'Contact Support'}
19+
</ActionButton>
20+
);
921
};

src/pages/public/claim/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ function ClaimPage(): JSX.Element {
180180
{channel_expiry} week
181181
{channel_expiry !== 1 ? 's' : ''}
182182
</span>
183-
.
183+
<br />
184+
Order ID: {order._id}
184185
</p>
185186
</div>
186187
</FormCard>

src/pages/public/order/index.scss

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
color: white;
1919
font-weight: 600;
2020
}
21+
22+
a {
23+
color: #FFAE00;
24+
}
2125
}
2226

2327
.value-group-row {

src/pages/public/order/index.tsx

+10-7
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,16 @@ function OrderPage(): JSX.Element {
149149
<p className={'order-state-message'}>{headerMessage}</p>
150150
<IconRing icon={icon} type={iconState} showCross={showIconCross} />
151151

152-
<div className={'order-state-support-button-container'}>
153-
<SupportButton orderId={order._id} />
154-
<span className={'order-state-support-button-spacer'} />
155-
<ActionButton onClick={() => dispatch(navigate({ page: 'configure' }))}>
156-
New channel
157-
</ActionButton>
158-
</div>
152+
{showSupportButtons ? (
153+
<div className={'order-state-support-button-container'}>
154+
<SupportButton orderId={order._id} size={'sm'} />
155+
<span className={'order-state-support-button-spacer'} />
156+
<ActionButton onClick={() => dispatch(navigate({ page: 'configure' }))} size={'sm'}>
157+
New channel
158+
</ActionButton>
159+
</div>
160+
) : null}
161+
159162
<Divider />
160163
<div className={'value-group-row'}>
161164
<ValueGroup

src/settings.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import bt, { btAdmin } from '@synonymdev/blocktank-client';
22

3-
export const supportEmail = 'suport@synonym.to';
3+
export const supportEmail = 'support@synonym.to';
44

55
export const supportSubject = (orderId?: string): string => {
66
return `BlockTank support${orderId ? ` (Order ID ${orderId})` : ''}`;

0 commit comments

Comments
 (0)