Skip to content

Commit 6c89c50

Browse files
committed
feat: Replace button elements with Button component for consistency
1 parent 9fb260b commit 6c89c50

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

src/features/settings/components/AddSearchEngine.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState } from 'react'
22
import { isValidURL } from 'src/utils/UrlUtils'
33

44
import { TiPlus } from 'react-icons/ti'
5+
import { Button } from 'src/components/Elements'
56
import { useUserPreferences } from 'src/stores/preferences'
67

78
export const AddSearchEngine = () => {
@@ -45,9 +46,9 @@ export const AddSearchEngine = () => {
4546
placeholder="https://google.com?q="
4647
/>
4748
<div>
48-
<button onClick={onAddSearchEngine}>
49-
<TiPlus /> Add
50-
</button>
49+
<Button startIcon={<TiPlus />} size="small" onClick={onAddSearchEngine}>
50+
Add
51+
</Button>
5152
</div>
5253
</div>
5354
{RssInputFeedback && (

src/features/settings/components/GeneralSettings/DNDSettings.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { useState } from 'react'
22
import { useNavigate } from 'react-router-dom'
33
import Select, { SingleValue } from 'react-select'
4+
import { Button } from 'src/components/Elements'
45
import { trackDNDEnable } from 'src/lib/analytics'
56
import { useUserPreferences } from 'src/stores/preferences'
67
import { diffBetweenTwoDatesInMinutes } from 'src/utils/DateUtils'
@@ -101,7 +102,9 @@ export const DNDSettings = () => {
101102
/>
102103
</div>
103104

104-
<button onClick={onApplyClicked}>Apply</button>
105+
<Button size="small" onClick={onApplyClicked}>
106+
Apply
107+
</Button>
105108
</div>
106109
{timeoutLabel() && (
107110
<div className="settingHint">

src/features/settings/components/GeneralSettings/generalSettings.css

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@
3535
.rssButton {
3636
background-color: #ee802f;
3737
color: white;
38+
&:hover {
39+
background-color: #f99147;
40+
color: white;
41+
}
3842
}
39-
.rssButton:hover {
40-
opacity: 0.9;
41-
}
43+
4244
.settingContent {
4345
width: 100%;
4446
flex: 1;

src/features/settings/components/RssSetting.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { identifyUserCards, trackRssSourceAdd } from 'src/lib/analytics'
55
import { isValidURL } from 'src/utils/UrlUtils'
66

77
import { BsRssFill } from 'react-icons/bs'
8+
import { Button } from 'src/components/Elements'
89
import { useUserPreferences } from 'src/stores/preferences'
910
import { SupportedCardType } from 'src/types'
1011

@@ -78,9 +79,13 @@ export const RssSetting = () => {
7879
<BeatLoader color={'#A9B2BD'} loading={isRssInputLoading} size={6} />
7980
) : (
8081
<div>
81-
<button className="rssButton" onClick={onRssAddClick}>
82-
<BsRssFill /> Add
83-
</button>
82+
<Button
83+
startIcon={<BsRssFill />}
84+
size="small"
85+
className="rssButton"
86+
onClick={onRssAddClick}>
87+
Add
88+
</Button>
8489
</div>
8590
)}
8691
</div>

0 commit comments

Comments
 (0)