Skip to content

Commit

Permalink
Add: InputSelect sroll chevrons
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelMariscal committed Aug 22, 2023
1 parent 19c8bcb commit c004200
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/GetQuoteForm/Input/InputSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client'

import * as Select from '@radix-ui/react-select'
import { Check, ChevronDownIcon } from 'lucide-react'
import { Check, ChevronDown, ChevronDownIcon, ChevronUp } from 'lucide-react'
import { useState } from 'react'
import { twMerge } from 'tailwind-merge'
import { clsx } from 'clsx'
Expand Down Expand Up @@ -71,7 +71,7 @@ export default function InputSelect<T>({
'data-[state=open]:animate-[show_300ms_forwards]',
)}
>
<Select.Viewport className="max-h-52">
<Select.Viewport className="max-h-52 ">
{options.map((option, i) => (
<Select.Item
key={option}
Expand All @@ -96,6 +96,12 @@ export default function InputSelect<T>({
)}
</Select.Item>
))}
<Select.ScrollUpButton className="fixed right-2 top-2">
<ChevronUp size={16} className="" />
</Select.ScrollUpButton>
<Select.ScrollDownButton className="fixed bottom-2 right-2">
<ChevronDown size={16} className="" />
</Select.ScrollDownButton>
</Select.Viewport>
</Select.Content>
</Select.Portal>
Expand Down

0 comments on commit c004200

Please sign in to comment.