Skip to content

Commit 3ae2b5e

Browse files
committed
style: Improve Bitcoin price chart time range buttons
- Add green/red arrow colors for price direction - Round button corners and remove divider lines - Center button text and adjust spacing - Remove hover effect on selected button
1 parent 77cfdac commit 3ae2b5e

2 files changed

Lines changed: 35 additions & 16 deletions

File tree

src/components/relay-dashboard/totalEarning/TimeRangeSelector/TimeRangeSelector.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ interface TimeRangeSelectorProps {
1212
const Container = styled.div`
1313
display: flex;
1414
justify-content: center;
15-
margin-top: 0.5rem;
15+
margin-top: 0.05rem;
16+
margin-bottom: 0;
1617
`;
1718

1819
const StyledRadioGroup = styled(Radio.Group)`
@@ -22,11 +23,17 @@ const StyledRadioGroup = styled(Radio.Group)`
2223
.ant-radio-button-wrapper {
2324
background: rgba(0, 255, 255, 0.05);
2425
border: 1px solid rgba(0, 255, 255, 0.2);
26+
border-radius: 6px;
2527
color: rgba(0, 255, 255, 0.8);
2628
font-size: 0.75rem;
2729
padding: 0.25rem 0.75rem;
30+
min-width: 2rem;
2831
height: auto;
2932
line-height: 1.2;
33+
text-align: center;
34+
display: inline-flex;
35+
justify-content: center;
36+
align-items: center;
3037
transition: all 0.3s ease;
3138
3239
&:hover {
@@ -44,10 +51,20 @@ const StyledRadioGroup = styled(Radio.Group)`
4451
&::before {
4552
background-color: rgba(0, 255, 255, 0.6);
4653
}
54+
55+
&:hover {
56+
background: rgba(0, 255, 255, 0.15);
57+
border-color: rgba(0, 255, 255, 0.6);
58+
color: #00ffff;
59+
}
4760
}
4861
4962
&:not(:first-child)::before {
50-
background-color: rgba(0, 255, 255, 0.2);
63+
display: none;
64+
}
65+
66+
&:nth-child(1) {
67+
min-width: 1.5rem;
5168
}
5269
}
5370

src/components/relay-dashboard/totalEarning/TotalEarning.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,19 @@ export const TotalEarning: React.FC = () => {
6262
<S.Title level={3} className="liquid-glow-text">{t('nft.bitcoinPrice')}</S.Title>
6363
</BaseCol>
6464
<BaseCol>
65-
<div className={`liquid-rate-indicator ${isIncreased ? 'success' : 'error'}`}>
66-
{isIncreased ? <CaretUpOutlined /> : <CaretDownOutlined />}
67-
<span>{rateDifference.toFixed(2)}</span>
68-
<span className="percentage-symbol">%</span>
65+
<div
66+
style={{
67+
display: 'flex',
68+
alignItems: 'center',
69+
gap: '4px',
70+
fontWeight: 600,
71+
fontSize: '0.9rem',
72+
}}
73+
>
74+
<span style={{ color: isIncreased ? '#34D399' : '#E94B2F' }}>
75+
{isIncreased ? <CaretUpOutlined /> : <CaretDownOutlined />}
76+
</span>
77+
<span>{rateDifference.toFixed(2)}%</span>
6978
</div>
7079
</BaseCol>
7180
</BaseRow>
@@ -78,16 +87,9 @@ export const TotalEarning: React.FC = () => {
7887
</BaseCol>
7988

8089
<BaseCol span={24}>
81-
<BaseRow wrap={false} justify="space-between" gutter={[20, 20]}>
82-
<BaseCol flex={1}>
83-
<div className="liquid-chart-container">
84-
<TotalEarningChart xAxisData={days} earningData={totalEarningData} />
85-
</div>
86-
</BaseCol>
87-
</BaseRow>
88-
</BaseCol>
89-
90-
<BaseCol span={24}>
90+
<div className="liquid-chart-container">
91+
<TotalEarningChart xAxisData={days} earningData={totalEarningData} />
92+
</div>
9193
<TimeRangeSelector value={timeRange} onChange={setTimeRange} />
9294
</BaseCol>
9395
</BaseRow>

0 commit comments

Comments
 (0)