Skip to content

Commit 6f91ad0

Browse files
committed
Refactor donate button icon container to use a div and BEM styling
1 parent 1c85b47 commit 6f91ad0

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
border: none;
99
border-radius: 5px;
1010
text-decoration: none;
11-
color: var(--vscode-foreground);
12-
height: 20px;
1311
gap: 4px;
14-
padding: 1px 5px 1px 0;
12+
padding: 2px 6px 2px 3px;
1513
font-size: 11px;
1614

1715
&:hover {
@@ -21,13 +19,14 @@
2119
&:focus {
2220
outline: none;
2321
}
24-
}
2522

26-
.icon-wrapper {
27-
display: flex;
28-
align-items: center;
29-
justify-content: center;
30-
width: 20px;
31-
height: 20px;
32-
color: var(--vscode-icon-foreground);
23+
&__icon {
24+
display: flex;
25+
align-items: center;
26+
height: 100%;
27+
28+
> span {
29+
font-size: 14px !important;
30+
}
31+
}
3332
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export type DonateButtonProps = {
99
export const DonateButton: React.FC<DonateButtonProps> = (props) => {
1010
return (
1111
<button className={styles.button} onClick={props.on_click}>
12-
<span className={styles['icon-wrapper']}>
12+
<div className={styles.button__icon}>
1313
<span className={cn('codicon', 'codicon-coffee')} />
14-
</span>
14+
</div>
1515
<span>{props.label}</span>
1616
</button>
1717
)

0 commit comments

Comments
 (0)