mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 05:39:11 +03:00
## Problem The `_Shadcn_` suffix isn't needed anymore on label component ## Solution Remove it. No other changes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Standardized Label usage across the codebase by removing the legacy alias and using the direct Label export from the UI package consistently. * **Documentation** * Updated component examples and docs to use the standardized Label component in usage snippets and demos. <!-- review_stack_entry_start --> [](https://app.coderabbit.ai/change-stack/supabase/supabase/pull/45986) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { Copy } from 'lucide-react'
|
|
import {
|
|
Button,
|
|
Dialog,
|
|
DialogClose,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogFooter,
|
|
DialogHeader,
|
|
DialogSection,
|
|
DialogSectionSeparator,
|
|
DialogTitle,
|
|
DialogTrigger,
|
|
Input,
|
|
Label,
|
|
} from 'ui'
|
|
|
|
export default function DialogCloseButton() {
|
|
return (
|
|
<Dialog>
|
|
<DialogTrigger asChild>
|
|
<Button type="default">Share</Button>
|
|
</DialogTrigger>
|
|
<DialogContent className="sm:max-w-md">
|
|
<DialogHeader>
|
|
<DialogTitle>Share link</DialogTitle>
|
|
<DialogDescription>Anyone who has this link will be able to view this.</DialogDescription>
|
|
</DialogHeader>
|
|
<DialogSectionSeparator />
|
|
<DialogSection>
|
|
<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="https://ui.shadcn.com/docs/installation" readOnly />
|
|
</div>
|
|
<Button htmlType="submit" size="small" type="secondary" className="px-3">
|
|
<span className="sr-only">Copy</span>
|
|
<Copy className="h-4 w-4" />
|
|
</Button>
|
|
</div>
|
|
</DialogSection>
|
|
<DialogFooter className="sm:justify-start">
|
|
<DialogClose asChild>
|
|
<Button type="default" htmlType="button">
|
|
Custom Close Button
|
|
</Button>
|
|
</DialogClose>
|
|
</DialogFooter>
|
|
</DialogContent>
|
|
</Dialog>
|
|
)
|
|
}
|