Skip to content

Commit b69e7d4

Browse files
committed
Replace Button with TextButton in Donations component and adjust styling for Fieldset, TextButton, and Modal components
1 parent 6e01b14 commit b69e7d4

5 files changed

Lines changed: 22 additions & 12 deletions

File tree

‎packages/ui/src/components/editor/panel/Donations/Donations.tsx‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import styles from './Donations.module.scss'
22
import { useEffect, useRef, useState } from 'react'
33
import cn from 'classnames'
44
import { Scrollable } from '../Scrollable'
5-
import { Button } from '../../common/Button/Button'
65
import { Fieldset } from '../Fieldset'
6+
import { TextButton } from '../TextButton'
77

88
const get_href_from_url_like_string = (text: string): string | null => {
99
if (/\s/.test(text)) {
@@ -136,7 +136,8 @@ export const Donations: React.FC<DonationsProps> = (props) => {
136136
<div className={styles.container}>
137137
<div className={styles.about}>
138138
Hi there! By donating to Code Web Chat, you’re supporting my mission
139-
to independently build the world’s best free and open-source AI coding tools.
139+
to independently build the world’s best free and open-source AI
140+
coding tools.
140141
<br />
141142
Thank you for your support!
142143
</div>
@@ -179,12 +180,9 @@ export const Donations: React.FC<DonationsProps> = (props) => {
179180
<span className={styles.wallets__wallet__hash}>
180181
{wallet.address}
181182
</span>
182-
<Button
183-
is_small
184-
on_click={() => props.on_show_qr_code(wallet)}
185-
>
183+
<TextButton on_click={() => props.on_show_qr_code(wallet)}>
186184
Scan QR
187-
</Button>
185+
</TextButton>
188186
</div>
189187
</div>
190188
))}

‎packages/ui/src/components/editor/panel/Fieldset/Fieldset.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
border-radius: 10px;
66

77
&__label {
8-
padding: 8px 12px 8px 12px;
8+
padding: 8px 10px 8px 10px;
99
font-size: 11px;
1010
font-weight: 600;
1111
color: var(--cwc-text-color-dimmed);
@@ -29,6 +29,6 @@
2929
display: flex;
3030
flex-direction: column;
3131
gap: 8px;
32-
padding: 2px 12px 12px 12px;
32+
padding: 2px 10px 10px 10px;
3333
}
3434
}

‎packages/ui/src/components/editor/panel/TextButton/TextButton.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.button {
2-
font-size: 12px;
32
color: var(--vscode-textLink-foreground);
3+
white-space: nowrap;
44

55
&:disabled {
66
opacity: 0.5;

‎packages/ui/src/components/editor/panel/modals/Modal/Modal.module.scss‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
.icon {
2525
font-size: 30px !important;
2626
text-align: center;
27-
margin-top: 24px;
27+
padding-top: 16px;
2828
display: flex;
2929
justify-content: center;
3030

@@ -42,6 +42,10 @@
4242
font-weight: 500;
4343
font-size: 14px;
4444
padding: 12px 12px 0 12px;
45+
46+
&--with-icon {
47+
padding-top: 6px;
48+
}
4549
}
4650

4751
.scrollable {

‎packages/ui/src/components/editor/panel/modals/Modal/Modal.tsx‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,15 @@ export const Modal: React.FC<Props> = (props) => {
3737
/>
3838
)}
3939

40-
{props.title && <div className={styles.title}>{props.title}</div>}
40+
{props.title && (
41+
<div
42+
className={cn(styles.title, {
43+
[styles['title--with-icon']]: !!props.icon
44+
})}
45+
>
46+
{props.title}
47+
</div>
48+
)}
4149

4250
{props.content_slot &&
4351
(props.content_max_height ? (

0 commit comments

Comments
 (0)