Skip to content

Commit

Permalink
Always show the tab list. #593
Browse files Browse the repository at this point in the history
  • Loading branch information
oldj committed May 27, 2022
1 parent 0326d2e commit b89cd43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/components/Pref/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { BiSliderAlt } from 'react-icons/bi'
import Advanced from './Advanced'
import Commands from './Commands'
import General from './General'
import styles from './styles.less'

interface Props {}

Expand Down Expand Up @@ -91,15 +92,15 @@ const PreferencePanel = (props: Props) => {
</DrawerHeader>

<DrawerBody>
<Tabs>
<Tabs className={styles.tabs}>
<TabList>
<Tab>{lang.general}</Tab>
<Tab>{lang.commands}</Tab>
<Tab>{lang.proxy}</Tab>
<Tab>{lang.advanced}</Tab>
</TabList>

<TabPanels>
<TabPanels className={styles.tab_panels}>
<TabPanel>
<General data={data} onChange={onUpdate} />
</TabPanel>
Expand Down
9 changes: 9 additions & 0 deletions src/renderer/components/Pref/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
color: inherit;
}

.tabs {
height: 100%;
}

.tab_panels {
height: calc(100% - 37px);
overflow: auto;
}

:global {
label {
span.chakra-radio__control {
Expand Down

0 comments on commit b89cd43

Please sign in to comment.