Skip to content

Commit

Permalink
feat: Do not use inline label for settings toggle button
Browse files Browse the repository at this point in the history
  • Loading branch information
ashchan committed Aug 4, 2019
1 parent 2f6e2b1 commit 75eded1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
5 changes: 2 additions & 3 deletions packages/neuron-ui/src/components/GeneralSetting/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ const GeneralSetting = ({ settings: { showAddressBook }, dispatch }: React.Props
return (
<Stack tokens={{ childrenGap: 15 }}>
<Toggle
inlineLabel
checked={showAddressBook}
label={t('settings.general.display-address-book-in-the-navbar')}
onText={t('settings.general.show')}
offText={t('settings.general.hide')}
onText={t('common.toggle.on')}
offText={t('common.toggle.off')}
onChange={onToggle}
/>
</Stack>
Expand Down
8 changes: 6 additions & 2 deletions packages/neuron-ui/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"network": "Network"
},
"general": {
"display-address-book-in-the-navbar": "Display the address book in the navigation",
"display-address-book-in-the-navbar": "Show the address book",
"show": "Show",
"hide": "Hide"
},
Expand Down Expand Up @@ -194,7 +194,11 @@
"or": "or",
"confirm": "Confirm",
"cancel": "Cancel",
"save": "Save"
"save": "Save",
"toggle": {
"on": "On",
"off": "Off"
}
},
"notification-panel": {
"title": "Notifications"
Expand Down
8 changes: 6 additions & 2 deletions packages/neuron-ui/src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"network": "网络"
},
"general": {
"display-address-book-in-the-navbar": "导航栏中显示地址簿",
"display-address-book-in-the-navbar": "显示地址簿",
"show": "显示",
"hide": "隐藏"
},
Expand Down Expand Up @@ -194,7 +194,11 @@
"or": "",
"confirm": "确认",
"cancel": "取消",
"save": "保存"
"save": "保存",
"toggle": {
"on": "",
"off": ""
}
},
"notification-panel": {
"title": "通知中心"
Expand Down

0 comments on commit 75eded1

Please sign in to comment.