From 759026d203091deff836f700806072b5f004ef43 Mon Sep 17 00:00:00 2001 From: aftabrehan Date: Sat, 3 Feb 2024 20:13:09 +0500 Subject: [PATCH] Fix Interface Variable Names --- components/button.tsx | 4 ++-- components/card.tsx | 4 ++-- components/footer.tsx | 4 ++-- components/modal/modal-portal.tsx | 7 +++++-- components/modal/modal.tsx | 4 ++-- components/nav-dropdown.tsx | 4 ++-- components/navbar.tsx | 4 ++-- components/search-bar.tsx | 4 ++-- components/section-wrapper.tsx | 4 ++-- components/theme/toggle-theme-button.tsx | 4 ++-- hooks/useClickOutside.ts | 4 ++-- 11 files changed, 25 insertions(+), 22 deletions(-) diff --git a/components/button.tsx b/components/button.tsx index 2092949..2a00a7e 100644 --- a/components/button.tsx +++ b/components/button.tsx @@ -2,7 +2,7 @@ import { CSSProperties } from 'react' import clsx from 'clsx' -interface buttonProps { +interface ButtonProps { label?: string onClick?: () => void variant?: 'primary' | 'secondary' | 'ghost' | 'outline' @@ -23,7 +23,7 @@ export const Button = ({ disabled, ref, ...props -}: buttonProps) => { +}: ButtonProps) => { const variantCls = { primary: 'text-white bg-primary xs:hover:opacity-75', secondary: diff --git a/components/card.tsx b/components/card.tsx index 7add1d4..618903c 100644 --- a/components/card.tsx +++ b/components/card.tsx @@ -1,14 +1,14 @@ import Link from 'next/link' import Image from 'next/image' -interface cardProps { +interface CardProps { link: string imageUrl: string title: string description: string } -export const Card = ({ link, imageUrl, title, description }: cardProps) => ( +export const Card = ({ link, imageUrl, title, description }: CardProps) => ( } -const Links = ({ title, links }: linksProps) => ( +const Links = ({ title, links }: LinksProps) => (

{title} diff --git a/components/modal/modal-portal.tsx b/components/modal/modal-portal.tsx index b06cf88..f9debcd 100644 --- a/components/modal/modal-portal.tsx +++ b/components/modal/modal-portal.tsx @@ -1,12 +1,15 @@ import { useRef, useEffect, useState } from 'react' import { createPortal } from 'react-dom' -interface modalPortal { +interface ModalPortalProps { children: React.ReactNode selector?: string } -export const ModalPortal = ({ children, selector = 'modal' }: modalPortal) => { +export const ModalPortal = ({ + children, + selector = 'modal', +}: ModalPortalProps) => { const ref = useRef(null) const [mounted, setMounted] = useState(false) diff --git a/components/modal/modal.tsx b/components/modal/modal.tsx index 3a54e07..b98d291 100644 --- a/components/modal/modal.tsx +++ b/components/modal/modal.tsx @@ -5,7 +5,7 @@ import { ModalPortal } from '@/components/modal/modal-portal' import { useClickOutside } from '@/hooks/useClickOutside' -interface modalProps { +interface ModalProps { isOpen: boolean close: () => void children: React.ReactNode @@ -19,7 +19,7 @@ export const Modal = ({ children, closeOnClickAway = false, className, -}: modalProps) => { +}: ModalProps) => { const contentRef = useRef(null) useClickOutside({ diff --git a/components/nav-dropdown.tsx b/components/nav-dropdown.tsx index 9d3893f..626c9dc 100644 --- a/components/nav-dropdown.tsx +++ b/components/nav-dropdown.tsx @@ -1,7 +1,7 @@ import Link from 'next/link' import clsx from 'clsx' -interface navDropdownProps { +interface NavDropdownProps { title: string link: string options: Array<{ label: string; link: string }> @@ -13,7 +13,7 @@ export const NavDropdown = ({ link, options, position = 'center', -}: navDropdownProps) => { +}: NavDropdownProps) => { const positionCls = { left: '-left-2', right: '-right-2', diff --git a/components/navbar.tsx b/components/navbar.tsx index f1734f9..b3c22b9 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -4,11 +4,11 @@ import { NavDropdown } from '@/components/nav-dropdown' import { ALL_NAV_ITEMS, LESS_NAV_ITEMS } from '@/constants/nav-items' -interface navbarProps { +interface NavbarProps { className?: string } -export const Navbar = ({ className }: navbarProps) => ( +export const Navbar = ({ className }: NavbarProps) => (