Skip to content

Commit 75eded1

Browse files
committed
feat: Do not use inline label for settings toggle button
1 parent 2f6e2b1 commit 75eded1

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

packages/neuron-ui/src/components/GeneralSetting/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ const GeneralSetting = ({ settings: { showAddressBook }, dispatch }: React.Props
1313
return (
1414
<Stack tokens={{ childrenGap: 15 }}>
1515
<Toggle
16-
inlineLabel
1716
checked={showAddressBook}
1817
label={t('settings.general.display-address-book-in-the-navbar')}
19-
onText={t('settings.general.show')}
20-
offText={t('settings.general.hide')}
18+
onText={t('common.toggle.on')}
19+
offText={t('common.toggle.off')}
2120
onChange={onToggle}
2221
/>
2322
</Stack>

packages/neuron-ui/src/locales/en.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"network": "Network"
130130
},
131131
"general": {
132-
"display-address-book-in-the-navbar": "Display the address book in the navigation",
132+
"display-address-book-in-the-navbar": "Show the address book",
133133
"show": "Show",
134134
"hide": "Hide"
135135
},
@@ -194,7 +194,11 @@
194194
"or": "or",
195195
"confirm": "Confirm",
196196
"cancel": "Cancel",
197-
"save": "Save"
197+
"save": "Save",
198+
"toggle": {
199+
"on": "On",
200+
"off": "Off"
201+
}
198202
},
199203
"notification-panel": {
200204
"title": "Notifications"

packages/neuron-ui/src/locales/zh.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"network": "网络"
130130
},
131131
"general": {
132-
"display-address-book-in-the-navbar": "导航栏中显示地址簿",
132+
"display-address-book-in-the-navbar": "显示地址簿",
133133
"show": "显示",
134134
"hide": "隐藏"
135135
},
@@ -194,7 +194,11 @@
194194
"or": "",
195195
"confirm": "确认",
196196
"cancel": "取消",
197-
"save": "保存"
197+
"save": "保存",
198+
"toggle": {
199+
"on": "",
200+
"off": ""
201+
}
198202
},
199203
"notification-panel": {
200204
"title": "通知中心"

0 commit comments

Comments
 (0)