mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 17:59:28 +08:00
add icon to time select
This commit is contained in:
@@ -9,6 +9,7 @@ import { $chartTime } from '@/lib/stores'
|
|||||||
import { chartTimeData, cn } from '@/lib/utils'
|
import { chartTimeData, cn } from '@/lib/utils'
|
||||||
import { ChartTimes } from '@/types'
|
import { ChartTimes } from '@/types'
|
||||||
import { useStore } from '@nanostores/react'
|
import { useStore } from '@nanostores/react'
|
||||||
|
import { HistoryIcon } from 'lucide-react'
|
||||||
|
|
||||||
export default function ChartTimeSelect({ className }: { className?: string }) {
|
export default function ChartTimeSelect({ className }: { className?: string }) {
|
||||||
const chartTime = useStore($chartTime)
|
const chartTime = useStore($chartTime)
|
||||||
@@ -19,7 +20,8 @@ export default function ChartTimeSelect({ className }: { className?: string }) {
|
|||||||
value={chartTime}
|
value={chartTime}
|
||||||
onValueChange={(value: ChartTimes) => $chartTime.set(value)}
|
onValueChange={(value: ChartTimes) => $chartTime.set(value)}
|
||||||
>
|
>
|
||||||
<SelectTrigger className={cn(className, 'px-5')}>
|
<SelectTrigger className={cn(className, 'relative pl-10 pr-5')}>
|
||||||
|
<HistoryIcon className="h-4 w-4 absolute left-4 top-1/2 -translate-y-1/2 opacity-80" />
|
||||||
<SelectValue />
|
<SelectValue />
|
||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
|
@@ -49,10 +49,9 @@ export default function () {
|
|||||||
</CardDescription>
|
</CardDescription>
|
||||||
</div>
|
</div>
|
||||||
<Input
|
<Input
|
||||||
// @ts-ignore
|
|
||||||
placeholder="Filter..."
|
placeholder="Filter..."
|
||||||
onChange={(e) => setFilter(e.target.value)}
|
onChange={(e) => setFilter(e.target.value)}
|
||||||
className="w-full md:w-56 lg:w-80 ml-auto"
|
className="w-full md:w-56 lg:w-80 ml-auto pl-4"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
|
Reference in New Issue
Block a user