Skip to content

Commit

Permalink
removes unnecessary displayName definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsfletch committed Jan 3, 2025
1 parent b90cbd4 commit 57bf6eb
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 82 deletions.
2 changes: 0 additions & 2 deletions templates/website/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,4 @@ const Button: React.FC<ButtonProps> = ({
return <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props} />
}

Button.displayName = 'Button'

export { Button, buttonVariants }
12 changes: 0 additions & 12 deletions templates/website/src/components/ui/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ const Card: React.FC<
/>
)

Card.displayName = 'Card'

const CardHeader: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.HTMLAttributes<HTMLDivElement>
> = ({ className, ref, ...props }) => (
<div className={cn('flex flex-col space-y-1.5 p-6', className)} ref={ref} {...props} />
)

CardHeader.displayName = 'CardHeader'

const CardTitle: React.FC<
{ ref?: React.Ref<HTMLHeadingElement> } & React.HTMLAttributes<HTMLHeadingElement>
> = ({ className, ref, ...props }) => (
Expand All @@ -31,30 +27,22 @@ const CardTitle: React.FC<
/>
)

CardTitle.displayName = 'CardTitle'

const CardDescription: React.FC<
{ ref?: React.Ref<HTMLParagraphElement> } & React.HTMLAttributes<HTMLParagraphElement>
> = ({ className, ref, ...props }) => (
<p className={cn('text-sm text-muted-foreground', className)} ref={ref} {...props} />
)

CardDescription.displayName = 'CardDescription'

const CardContent: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.HTMLAttributes<HTMLDivElement>
> = ({ className, ref, ...props }) => (
<div className={cn('p-6 pt-0', className)} ref={ref} {...props} />
)

CardContent.displayName = 'CardContent'

const CardFooter: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.HTMLAttributes<HTMLDivElement>
> = ({ className, ref, ...props }) => (
<div className={cn('flex items-center p-6 pt-0', className)} ref={ref} {...props} />
)

CardFooter.displayName = 'CardFooter'

export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle }
2 changes: 0 additions & 2 deletions templates/website/src/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ const Checkbox: React.FC<
</CheckboxPrimitive.Root>
)

Checkbox.displayName = CheckboxPrimitive.Root.displayName

export { Checkbox }
2 changes: 0 additions & 2 deletions templates/website/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ const Input: React.FC<
)
}

Input.displayName = 'Input'

export { Input }
2 changes: 0 additions & 2 deletions templates/website/src/components/ui/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ const Label: React.FC<
<LabelPrimitive.Root className={cn(labelVariants(), className)} ref={ref} {...props} />
)

Label.displayName = LabelPrimitive.Root.displayName

export { Label }
12 changes: 0 additions & 12 deletions templates/website/src/components/ui/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,16 @@ const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
/>
)

Pagination.displayName = 'Pagination'

const PaginationContent: React.FC<
{ ref?: React.Ref<HTMLUListElement> } & React.HTMLAttributes<HTMLUListElement>
> = ({ className, ref, ...props }) => (
<ul className={cn('flex flex-row items-center gap-1', className)} ref={ref} {...props} />
)

PaginationContent.displayName = 'PaginationContent'

const PaginationItem: React.FC<
{ ref?: React.Ref<HTMLLIElement> } & React.HTMLAttributes<HTMLLIElement>
> = ({ className, ref, ...props }) => <li className={cn('', className)} ref={ref} {...props} />

PaginationItem.displayName = 'PaginationItem'

type PaginationLinkProps = {
isActive?: boolean
} & Pick<ButtonProps, 'size'> &
Expand All @@ -48,7 +42,6 @@ const PaginationLink = ({ className, isActive, size = 'icon', ...props }: Pagina
{...props}
/>
)
PaginationLink.displayName = 'PaginationLink'

const PaginationPrevious = ({
className,
Expand All @@ -64,7 +57,6 @@ const PaginationPrevious = ({
<span>Previous</span>
</PaginationLink>
)
PaginationPrevious.displayName = 'PaginationPrevious'

const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
<PaginationLink
Expand All @@ -78,8 +70,6 @@ const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof Pag
</PaginationLink>
)

PaginationNext.displayName = 'PaginationNext'

const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (
<span
aria-hidden
Expand All @@ -91,8 +81,6 @@ const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'
</span>
)

PaginationEllipsis.displayName = 'PaginationEllipsis'

export {
Pagination,
PaginationContent,
Expand Down
13 changes: 0 additions & 13 deletions templates/website/src/components/ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const SelectTrigger: React.FC<
</SelectPrimitive.Trigger>
)

SelectTrigger.displayName = SelectPrimitive.Trigger.displayName

const SelectScrollUpButton: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>
> = ({ className, ref, ...props }) => (
Expand All @@ -43,8 +41,6 @@ const SelectScrollUpButton: React.FC<
</SelectPrimitive.ScrollUpButton>
)

SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName

const SelectScrollDownButton: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<
typeof SelectPrimitive.ScrollDownButton
Expand All @@ -58,7 +54,6 @@ const SelectScrollDownButton: React.FC<
<ChevronDown className="h-4 w-4" />
</SelectPrimitive.ScrollDownButton>
)
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName

const SelectContent: React.FC<
{
Expand Down Expand Up @@ -92,8 +87,6 @@ const SelectContent: React.FC<
</SelectPrimitive.Portal>
)

SelectContent.displayName = SelectPrimitive.Content.displayName

const SelectLabel: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Label>
> = ({ className, ref, ...props }) => (
Expand All @@ -104,8 +97,6 @@ const SelectLabel: React.FC<
/>
)

SelectLabel.displayName = SelectPrimitive.Label.displayName

const SelectItem: React.FC<
{ ref?: React.Ref<HTMLDivElement>; value: string } & React.ComponentProps<
typeof SelectPrimitive.Item
Expand All @@ -129,8 +120,6 @@ const SelectItem: React.FC<
</SelectPrimitive.Item>
)

SelectItem.displayName = SelectPrimitive.Item.displayName

const SelectSeparator: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Separator>
> = ({ className, ref, ...props }) => (
Expand All @@ -141,8 +130,6 @@ const SelectSeparator: React.FC<
/>
)

SelectSeparator.displayName = SelectPrimitive.Separator.displayName

export {
Select,
SelectContent,
Expand Down
2 changes: 0 additions & 2 deletions templates/website/src/components/ui/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ const Textarea: React.FC<
)
}

Textarea.displayName = 'Textarea'

export { Textarea }
2 changes: 0 additions & 2 deletions templates/with-vercel-website/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,4 @@ const Button: React.FC<ButtonProps & { ref?: React.Ref<HTMLButtonElement> }> = (
return <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props} />
}

Button.displayName = 'Button'

export { Button, buttonVariants }
2 changes: 0 additions & 2 deletions templates/with-vercel-website/src/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ const Checkbox: React.FC<
</CheckboxPrimitive.Root>
)

Checkbox.displayName = CheckboxPrimitive.Root.displayName

export { Checkbox }
2 changes: 0 additions & 2 deletions templates/with-vercel-website/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ const Input: React.FC<
)
}

Input.displayName = 'Input'

export { Input }
2 changes: 0 additions & 2 deletions templates/with-vercel-website/src/components/ui/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,4 @@ const Label: React.FC<
<LabelPrimitive.Root className={cn(labelVariants(), className)} ref={ref} {...props} />
)

Label.displayName = LabelPrimitive.Root.displayName

export { Label }
12 changes: 0 additions & 12 deletions templates/with-vercel-website/src/components/ui/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,16 @@ const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
/>
)

Pagination.displayName = 'Pagination'

const PaginationContent: React.FC<
{ ref?: React.Ref<HTMLUListElement> } & React.HTMLAttributes<HTMLUListElement>
> = ({ className, ref, ...props }) => (
<ul className={cn('flex flex-row items-center gap-1', className)} ref={ref} {...props} />
)

PaginationContent.displayName = 'PaginationContent'

const PaginationItem: React.FC<
{ ref?: React.Ref<HTMLLIElement> } & React.HTMLAttributes<HTMLLIElement>
> = ({ className, ref, ...props }) => <li className={cn('', className)} ref={ref} {...props} />

PaginationItem.displayName = 'PaginationItem'

type PaginationLinkProps = {
isActive?: boolean
} & Pick<ButtonProps, 'size'> &
Expand All @@ -48,7 +42,6 @@ const PaginationLink = ({ className, isActive, size = 'icon', ...props }: Pagina
{...props}
/>
)
PaginationLink.displayName = 'PaginationLink'

const PaginationPrevious = ({
className,
Expand All @@ -64,7 +57,6 @@ const PaginationPrevious = ({
<span>Previous</span>
</PaginationLink>
)
PaginationPrevious.displayName = 'PaginationPrevious'

const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof PaginationLink>) => (
<PaginationLink
Expand All @@ -78,8 +70,6 @@ const PaginationNext = ({ className, ...props }: React.ComponentProps<typeof Pag
</PaginationLink>
)

PaginationNext.displayName = 'PaginationNext'

const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => (
<span
aria-hidden
Expand All @@ -91,8 +81,6 @@ const PaginationEllipsis = ({ className, ...props }: React.ComponentProps<'span'
</span>
)

PaginationEllipsis.displayName = 'PaginationEllipsis'

export {
Pagination,
PaginationContent,
Expand Down
13 changes: 0 additions & 13 deletions templates/with-vercel-website/src/components/ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ const SelectTrigger: React.FC<
</SelectPrimitive.Trigger>
)

SelectTrigger.displayName = SelectPrimitive.Trigger.displayName

const SelectScrollUpButton: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>
> = ({ className, ref, ...props }) => (
Expand All @@ -43,8 +41,6 @@ const SelectScrollUpButton: React.FC<
</SelectPrimitive.ScrollUpButton>
)

SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName

const SelectScrollDownButton: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<
typeof SelectPrimitive.ScrollDownButton
Expand All @@ -58,7 +54,6 @@ const SelectScrollDownButton: React.FC<
<ChevronDown className="h-4 w-4" />
</SelectPrimitive.ScrollDownButton>
)
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName

const SelectContent: React.FC<
{
Expand Down Expand Up @@ -92,8 +87,6 @@ const SelectContent: React.FC<
</SelectPrimitive.Portal>
)

SelectContent.displayName = SelectPrimitive.Content.displayName

const SelectLabel: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Label>
> = ({ className, ref, ...props }) => (
Expand All @@ -104,8 +97,6 @@ const SelectLabel: React.FC<
/>
)

SelectLabel.displayName = SelectPrimitive.Label.displayName

const SelectItem: React.FC<
{ ref?: React.Ref<HTMLDivElement>; value: string } & React.ComponentProps<
typeof SelectPrimitive.Item
Expand All @@ -129,8 +120,6 @@ const SelectItem: React.FC<
</SelectPrimitive.Item>
)

SelectItem.displayName = SelectPrimitive.Item.displayName

const SelectSeparator: React.FC<
{ ref?: React.Ref<HTMLDivElement> } & React.ComponentProps<typeof SelectPrimitive.Separator>
> = ({ className, ref, ...props }) => (
Expand All @@ -141,8 +130,6 @@ const SelectSeparator: React.FC<
/>
)

SelectSeparator.displayName = SelectPrimitive.Separator.displayName

export {
Select,
SelectContent,
Expand Down
2 changes: 0 additions & 2 deletions templates/with-vercel-website/src/components/ui/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,4 @@ const Textarea: React.FC<
)
}

Textarea.displayName = 'Textarea'

export { Textarea }

0 comments on commit 57bf6eb

Please sign in to comment.