mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-04 05:39:06 +00:00
Format next.js web app with prettier
This commit is contained in:
@@ -34,37 +34,34 @@ function copyToClipboard(text: string) {
|
||||
export default function ShareLink(props: ShareLinkProps) {
|
||||
return (
|
||||
<Dialog>
|
||||
<DialogTrigger
|
||||
asChild
|
||||
onClick={props.onShare}>
|
||||
<Button size="sm" className={`${props.buttonClassName || 'px-3'}`} variant={props.buttonVariant ?? 'default' as const}>
|
||||
{
|
||||
props.includeIcon && (
|
||||
<Share className="w-4 h-4 mr-2" />
|
||||
)
|
||||
}
|
||||
<DialogTrigger asChild onClick={props.onShare}>
|
||||
<Button
|
||||
size="sm"
|
||||
className={`${props.buttonClassName || "px-3"}`}
|
||||
variant={props.buttonVariant ?? ("default" as const)}
|
||||
>
|
||||
{props.includeIcon && <Share className="w-4 h-4 mr-2" />}
|
||||
{props.buttonTitle}
|
||||
</Button>
|
||||
</DialogTrigger>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>{props.title}</DialogTitle>
|
||||
<DialogDescription>
|
||||
{props.description}
|
||||
</DialogDescription>
|
||||
<DialogDescription>{props.description}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="flex items-center space-x-2">
|
||||
<div className="grid flex-1 gap-2">
|
||||
<Label htmlFor="link" className="sr-only">
|
||||
Link
|
||||
</Label>
|
||||
<Input
|
||||
id="link"
|
||||
defaultValue={props.url}
|
||||
readOnly
|
||||
/>
|
||||
<Input id="link" defaultValue={props.url} readOnly />
|
||||
</div>
|
||||
<Button type="submit" size="sm" className="px-3" onClick={() => copyToClipboard(props.url)}>
|
||||
<Button
|
||||
type="submit"
|
||||
size="sm"
|
||||
className="px-3"
|
||||
onClick={() => copyToClipboard(props.url)}
|
||||
>
|
||||
<span>Copy</span>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user