* Add keyboard custom icon * Refactor Settings to be more modular * Add basic keybindings view to settings * Add more shortcuts * Add link to see keyboard shortcuts tab * Little more bottom padding * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Add keybindings to settings search * Add a playwright test for opening the the keyboard shortcuts * fmt --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import { RadioGroup } from '@headlessui/react'
|
|
import { SettingsTabButton } from './SettingsTabButton'
|
|
|
|
interface SettingsTabButtonProps {
|
|
value: string
|
|
onChange: (value: string) => void
|
|
showProjectTab: boolean
|
|
}
|
|
|
|
export function SettingsTabs({
|
|
value,
|
|
onChange,
|
|
showProjectTab,
|
|
}: SettingsTabButtonProps) {
|
|
return (
|
|
<RadioGroup
|
|
value={value}
|
|
onChange={onChange}
|
|
className="flex justify-start pl-4 pr-5 gap-5 border-0 border-b border-b-chalkboard-20 dark:border-b-chalkboard-90"
|
|
>
|
|
<RadioGroup.Option value="user">
|
|
{({ checked }) => (
|
|
<SettingsTabButton checked={checked} icon="person" text="User" />
|
|
)}
|
|
</RadioGroup.Option>
|
|
{showProjectTab && (
|
|
<RadioGroup.Option value="project">
|
|
{({ checked }) => (
|
|
<SettingsTabButton
|
|
checked={checked}
|
|
icon="folder"
|
|
text="This project"
|
|
/>
|
|
)}
|
|
</RadioGroup.Option>
|
|
)}
|
|
<RadioGroup.Option value="keybindings">
|
|
{({ checked }) => (
|
|
<SettingsTabButton
|
|
checked={checked}
|
|
icon="keyboard"
|
|
text="Keybindings"
|
|
/>
|
|
)}
|
|
</RadioGroup.Option>
|
|
</RadioGroup>
|
|
)
|
|
}
|