@@ -5,15 +5,13 @@ import { CheckIcon } from '@heroicons/react/24/outline'
55import clsx from 'clsx'
66
77interface SettingsControlProps {
8- settings : {
9- showColumns : boolean
10- }
11- onSettingChange : ( setting : string , value : boolean ) => void
8+ showColumns : boolean
9+ onWithColumnsChange : ( value : boolean ) => void
1210}
1311
1412export function SettingsControl ( {
15- settings ,
16- onSettingChange ,
13+ showColumns ,
14+ onWithColumnsChange ,
1715} : SettingsControlProps ) : JSX . Element {
1816 return (
1917 < Menu as = "div" className = "relative" >
@@ -29,7 +27,7 @@ export function SettingsControl({
2927 leaveFrom = "transform opacity-100 scale-100"
3028 leaveTo = "transform opacity-0 scale-95"
3129 >
32- < Menu . Items className = "absolute bottom-full mb-2 right -0 w-56 origin-bottom-right divide-y divide-neutral-100 dark:divide-neutral-800 rounded-md bg-theme shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-50" >
30+ < Menu . Items className = "absolute bottom-full mb-2 left -0 w-56 origin-bottom-left divide-y divide-neutral-100 dark:divide-neutral-800 rounded-md bg-theme shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-50" >
3331 < div className = "px-1 py-1" >
3432 < Menu . Item >
3533 { ( { active } ) => (
@@ -40,10 +38,10 @@ export function SettingsControl({
4038 ? 'bg-primary-10 text-primary-500'
4139 : 'text-neutral-700 dark:text-neutral-300'
4240 ) }
43- onClick = { ( ) => onSettingChange ( 'showColumns' , ! settings . showColumns ) }
41+ onClick = { ( ) => onWithColumnsChange ( ! showColumns ) }
4442 >
4543 < span className = "flex-1 text-left" > Show Columns</ span >
46- { settings . showColumns && (
44+ { showColumns && (
4745 < CheckIcon className = "h-4 w-4 text-primary-500" aria-hidden = "true" />
4846 ) }
4947 </ button >
0 commit comments