Skip to content

Commit 369ef14

Browse files
committed
chore: change style of BRC20
1 parent 3e70eff commit 369ef14

File tree

4 files changed

+28
-20
lines changed

4 files changed

+28
-20
lines changed

src/ui/components/BRC20BalanceCard2/index.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ export default function BRC20BalanceCard2(props: BRC20BalanceCard2Props) {
133133
<Card
134134
key={'transfer_' + index}
135135
style={{ width: 68, height: 68 }}
136-
bg={v === 'Deploy' ? 'brc20_deploy' : 'brc20_transfer'}>
136+
bg={v === 'Transfer' ? 'brc20_transfer' : v === 'Deploy' ? 'brc20_deploy' : 'brc20_other'}>
137137
<Column gap="zero">
138-
<Text text={v} size={v === 'Transfer' ? 'sm' : v === 'Deploy' ? 'md' : 'xxl'} />
138+
<Text text={v} size={v === 'Transfer' ? 'sm' : v === 'Deploy' ? 'sm' : 'md'} />
139139
{v === 'Transfer' ? <Text text={`(${_amounts[index]})`} size="xxs" textCenter wrap /> : null}
140140
</Column>
141141
</Card>

src/ui/components/BRC20Preview/index.tsx

+18-11
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ export default function BRC20Preview({
3232
}
3333
let balanceSize = 'xxl';
3434
if (balance.length < 7) {
35-
balanceSize = 'xxl';
35+
balanceSize = 'md';
3636
} else if (balance.length < 14) {
37-
balanceSize = 'xl';
37+
balanceSize = 'md';
3838
} else if (balance.length < 21) {
3939
balanceSize = 'md';
4040
} else {
@@ -44,7 +44,7 @@ export default function BRC20Preview({
4444
let width = 100;
4545
let height = 130;
4646
let bodyHeight = 90;
47-
let numberSize: any = 'md';
47+
let numberSize: any = 'sm';
4848
let tickerPreset: any = 'md';
4949
if (preset === 'small') {
5050
width = 80;
@@ -76,23 +76,30 @@ export default function BRC20Preview({
7676
borderWidth: selected ? 1 : 0,
7777
borderColor: colors.primary
7878
}}
79+
gap="zero"
7980
onClick={onClick}>
80-
<Column
81+
<Row
82+
bg={bg}
8183
style={{
82-
padding: 8,
83-
height: bodyHeight,
8484
borderTopLeftRadius: 5,
8585
borderTopRightRadius: 5
86-
}}
87-
bg={bg}>
88-
<Row>
86+
}}>
87+
<Row
88+
style={{ backgroundColor: 'rgba(255,255,255,0.2)', borderBottomRightRadius: 5, borderTopLeftRadius: 5 }}
89+
px="sm">
8990
<BRC20Ticker tick={tick} preset={tickerPreset} />
9091
</Row>
91-
92+
</Row>
93+
<Column
94+
style={{
95+
height: bodyHeight
96+
}}
97+
justifyCenter
98+
bg={bg}>
9299
<Text text={balance} size={balanceSize as any} textCenter wrap />
93100
</Column>
94101

95-
<Column px="sm" pb="sm" gap="sm">
102+
<Column px="sm" pb="sm" gap="sm" py="sm">
96103
<Row itemsCenter justifyCenter>
97104
<Text text={`#${inscriptionNumber}`} color="primary" size={numberSize} />
98105
</Row>

src/ui/pages/BRC20/BRC20TokenScreen.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ export default function BRC20TokenScreen() {
160160
</Column>
161161
<Column>
162162
<Row justifyBetween>
163-
<Text text="Transferable" preset="bold" size="lg" />
164-
<Row itemsCenter>
165-
<Text text={`${tokenSummary.tokenBalance.transferableBalance}`} preset="bold" size="lg" wrap />
163+
<Text text="Transferable" preset="bold" size="md" />
164+
<Row itemsCenter justifyCenter>
165+
<Text text={`${tokenSummary.tokenBalance.transferableBalance}`} size="md" wrap />
166166
<BRC20Ticker tick={ticker} />
167167
</Row>
168168
</Row>

src/ui/theme/colors.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const palette = {
1919
green_light: '#5ec04f',
2020

2121
yellow_dark: '#d5ac00',
22-
yellow: 'rgb(253,224,71)',
22+
yellow: '#e3bb5f',
2323
yellow_light: '#fcd226',
2424

2525
red_dark: '#c92b40',
@@ -62,9 +62,10 @@ export const colors = Object.assign({}, palette, {
6262

6363
icon_yellow: '#FFBA33',
6464

65-
brc20_deploy: '#9F5315',
66-
brc20_transfer: '#2D7E24',
67-
brc20_transfer_selected: '#41B530'
65+
brc20_deploy: '#233933',
66+
brc20_transfer: '#375e4d',
67+
brc20_transfer_selected: '#41B530',
68+
brc20_other: '#3e3e3e'
6869
});
6970

7071
export type ColorTypes = keyof typeof colors;

0 commit comments

Comments
 (0)