import { useId } from 'react'
import { SendHorizonalIcon } from 'lucide-react'
import { Button } from '@/registry/new-york/ui/button'
import { Input } from '@/registry/new-york/ui/input'
import { Label } from '@/registry/new-york/ui/label'
const InputEndInlineButtonDemo = () => {
const id = useId()
return (
<div className='w-full max-w-xs space-y-2'>
<Label htmlFor={id}>Input with end inline button</Label>
<div className='relative'>
<Input id={id} type='email' placeholder='Email address' className='pr-9' />
<Button
variant='ghost'
size='icon'
className='text-muted-foreground focus-visible:ring-ring/50 absolute inset-y-0 right-0 rounded-l-none hover:bg-transparent'
>
<SendHorizonalIcon />
<span className='sr-only'>Subscribe</span>
</Button>
</div>
</div>
)
}
export default InputEndInlineButtonDemo