diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-23 08:20:44 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-23 08:20:44 +0700 |
| commit | a553af3576985e6d14cf59177a6cca9fa108c0bb (patch) | |
| tree | 763f73dafe6cc69c913eacafdc26e972849092b1 /src/core/components/elements | |
| parent | e5aea4632cb84c9d5e04024b67d149178f794ba6 (diff) | |
| parent | 404afb8b94b5d8d88f6dfd619cde0b5a122fbc42 (diff) | |
prettier
Diffstat (limited to 'src/core/components/elements')
10 files changed, 79 insertions, 19 deletions
diff --git a/src/core/components/elements/Appbar/Appbar.jsx b/src/core/components/elements/Appbar/Appbar.jsx index 4300287f..098d0a33 100644 --- a/src/core/components/elements/Appbar/Appbar.jsx +++ b/src/core/components/elements/Appbar/Appbar.jsx @@ -8,19 +8,32 @@ const AppBar = ({ title }) => { return ( <nav className='sticky top-0 z-50 bg-white border-b border-gray_r-6 flex justify-between'> <div className='flex items-center'> - <button type='button' className='p-4' onClick={() => router.back()}> + <button + type='button' + className='p-4' + onClick={() => router.back()} + > <ChevronLeftIcon className='w-6 stroke-2' /> </button> <div className='font-medium text-h-sm line-clamp-1'>{title}</div> </div> <div className='flex items-center px-2'> - <Link href='/shop/cart' className='py-4 px-2'> + <Link + href='/shop/cart' + className='py-4 px-2' + > <ShoppingCartIcon className='w-6 text-gray_r-12' /> </Link> - <Link href='/' className='py-4 px-2'> + <Link + href='/' + className='py-4 px-2' + > <HomeIcon className='w-6 text-gray_r-12' /> </Link> - <Link href='/my/menu' className='py-4 px-2'> + <Link + href='/my/menu' + className='py-4 px-2' + > <Bars3Icon className='w-6 text-gray_r-12' /> </Link> </div> diff --git a/src/core/components/elements/Badge/Badge.jsx b/src/core/components/elements/Badge/Badge.jsx index 5e22db1a..e50cdc78 100644 --- a/src/core/components/elements/Badge/Badge.jsx +++ b/src/core/components/elements/Badge/Badge.jsx @@ -1,6 +1,9 @@ const Badge = ({ children, type, ...props }) => { return ( - <div {...props} className={`${badgeStyle(type)} ${props?.className}`}> + <div + {...props} + className={`${badgeStyle(type)} ${props?.className}`} + > {children} </div> ) diff --git a/src/core/components/elements/Navbar/Navbar.jsx b/src/core/components/elements/Navbar/Navbar.jsx index e2caebfe..8cecee5b 100644 --- a/src/core/components/elements/Navbar/Navbar.jsx +++ b/src/core/components/elements/Navbar/Navbar.jsx @@ -14,7 +14,12 @@ const Navbar = () => { <nav className='px-4 py-2 pb-3 sticky top-0 z-50 bg-white shadow'> <div className='flex justify-between items-center mb-2'> <Link href='/'> - <Image src={IndoteknikLogo} alt='Indoteknik Logo' width={120} height={40} /> + <Image + src={IndoteknikLogo} + alt='Indoteknik Logo' + width={120} + height={40} + /> </Link> <div className='flex gap-x-3'> <Link href='/my/wishlist'> @@ -23,7 +28,10 @@ const Navbar = () => { <Link href='/shop/cart'> <ShoppingCartIcon className='w-6 text-gray_r-12' /> </Link> - <button type='button' onClick={open}> + <button + type='button' + onClick={open} + > <Bars3Icon className='w-6 text-gray_r-12' /> </button> </div> diff --git a/src/core/components/elements/Navbar/Search.jsx b/src/core/components/elements/Navbar/Search.jsx index 6f0e4dd9..ff2c7adb 100644 --- a/src/core/components/elements/Navbar/Search.jsx +++ b/src/core/components/elements/Navbar/Search.jsx @@ -50,7 +50,10 @@ const Search = () => { } return ( - <form onSubmit={handleSubmit} className='flex relative'> + <form + onSubmit={handleSubmit} + className='flex relative' + > <input type='text' ref={queryRef} @@ -61,7 +64,10 @@ const Search = () => { onBlur={onInputBlur} onFocus={loadSuggestion} /> - <button type='submit' className='rounded-r border border-l-0 border-gray_r-6 px-2'> + <button + type='submit' + className='rounded-r border border-l-0 border-gray_r-6 px-2' + > <MagnifyingGlassIcon className='w-6' /> </button> diff --git a/src/core/components/elements/Pagination/Pagination.js b/src/core/components/elements/Pagination/Pagination.js index c009171f..18964fc4 100644 --- a/src/core/components/elements/Pagination/Pagination.js +++ b/src/core/components/elements/Pagination/Pagination.js @@ -26,7 +26,10 @@ const Pagination = ({ pageCount, currentPage, url, className }) => { </Link> ) let DotsComponent = ( - <div key={i} className='pagination-dots'> + <div + key={i} + className='pagination-dots' + > ... </div> ) diff --git a/src/core/components/elements/Popup/BottomPopup.jsx b/src/core/components/elements/Popup/BottomPopup.jsx index af1149ca..24366802 100644 --- a/src/core/components/elements/Popup/BottomPopup.jsx +++ b/src/core/components/elements/Popup/BottomPopup.jsx @@ -35,7 +35,10 @@ const BottomPopup = ({ children, active = false, title, close }) => { > <div className='flex justify-between py-4'> <div className='font-semibold text-h-sm'>{title}</div> - <button type='button' onClick={close}> + <button + type='button' + onClick={close} + > <XMarkIcon className='w-5 stroke-2' /> </button> </div> diff --git a/src/core/components/elements/Sidebar/Sidebar.jsx b/src/core/components/elements/Sidebar/Sidebar.jsx index 08f1fed5..cdeb3e05 100644 --- a/src/core/components/elements/Sidebar/Sidebar.jsx +++ b/src/core/components/elements/Sidebar/Sidebar.jsx @@ -8,7 +8,10 @@ const Sidebar = ({ active, close }) => { const auth = useAuth() const SidebarLink = ({ children, ...props }) => ( - <Link {...props} onClick={close}> + <Link + {...props} + onClick={close} + > {children} </Link> ) @@ -74,13 +77,22 @@ const Sidebar = ({ active, close }) => { </> )} </div> - <SidebarLink className={itemClassName} href='/'> + <SidebarLink + className={itemClassName} + href='/' + > Semua Brand </SidebarLink> - <SidebarLink className={itemClassName} href='/'> + <SidebarLink + className={itemClassName} + href='/' + > Tentang Indoteknik </SidebarLink> - <SidebarLink className={itemClassName} href='/'> + <SidebarLink + className={itemClassName} + href='/' + > Pusat Bantuan </SidebarLink> <button className={`${itemClassName} w-full text-left`}>Kategori</button> diff --git a/src/core/components/elements/Skeleton/BrandSkeleton.jsx b/src/core/components/elements/Skeleton/BrandSkeleton.jsx index 9a7a51f9..9a34fb9b 100644 --- a/src/core/components/elements/Skeleton/BrandSkeleton.jsx +++ b/src/core/components/elements/Skeleton/BrandSkeleton.jsx @@ -1,5 +1,8 @@ const BrandSkeleton = () => ( - <div role='status' className='animate-pulse'> + <div + role='status' + className='animate-pulse' + > <div className='h-12 bg-gray-200 rounded'></div> <span className='sr-only'>Loading...</span> </div> diff --git a/src/core/components/elements/Skeleton/ImageSkeleton.jsx b/src/core/components/elements/Skeleton/ImageSkeleton.jsx index 2ca6b2a3..39d06331 100644 --- a/src/core/components/elements/Skeleton/ImageSkeleton.jsx +++ b/src/core/components/elements/Skeleton/ImageSkeleton.jsx @@ -1,6 +1,12 @@ const ImageSkeleton = () => ( - <div role='status' className='animate-pulse'> - <div className='flex items-center justify-center h-56 mb-4 bg-gray-300 rounded' aria-busy> + <div + role='status' + className='animate-pulse' + > + <div + className='flex items-center justify-center h-56 mb-4 bg-gray-300 rounded' + aria-busy + > <svg className='w-12 h-12 text-gray-200' xmlns='http://www.w3.org/2000/svg' diff --git a/src/core/components/elements/Skeleton/ProductCardSkeleton.jsx b/src/core/components/elements/Skeleton/ProductCardSkeleton.jsx index 84d1c0d1..ddc0d3bc 100644 --- a/src/core/components/elements/Skeleton/ProductCardSkeleton.jsx +++ b/src/core/components/elements/Skeleton/ProductCardSkeleton.jsx @@ -3,7 +3,10 @@ const ProductCardSkeleton = () => ( role='status' className='p-4 max-w-sm rounded border border-gray-300 shadow animate-pulse md:p-6' > - <div className='flex items-center justify-center h-36 mb-4 bg-gray-300 rounded' aria-busy> + <div + className='flex items-center justify-center h-36 mb-4 bg-gray-300 rounded' + aria-busy + > <svg className='w-12 h-12 text-gray-200' xmlns='http://www.w3.org/2000/svg' |
