Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
Blog
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sakilesh J
Blog
Commits
c0269b0e
Commit
c0269b0e
authored
Jul 31, 2024
by
Sakilesh J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add loaders
parent
733dd1d5
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
5 deletions
+27
-5
BlogCard.tsx
components/Top-Level/blog-card/BlogCard.tsx
+1
-1
Button.tsx
components/base/Button/Button.tsx
+1
-1
Loader.tsx
components/base/loader/Loader.tsx
+1
-1
loader.stories.tsx
components/base/loader/loader.stories.tsx
+21
-0
next.config.js
next.config.js
+0
-1
Home.tsx
pages/Home.tsx
+3
-1
No files found.
components/Top-Level/blog-card/BlogCard.tsx
View file @
c0269b0e
...
...
@@ -17,7 +17,7 @@ const BlogCard: React.FC<blogcardprops> = ({ img, title, description, id,handleC
dark:*:text-white group h-full"
onClick=
{
handleClick
}
>
{
img
&&
<
Image
src=
{
img
}
width=
{
900
}
height=
{
900
}
alt=
""
className=
"w-full h-[220px] rounded-t-lg object-cover
"
/>
<
Image
src=
{
img
}
width=
{
900
}
height=
{
900
}
alt=
""
className=
"w-full h-[220px] rounded-t-lg object-cover"
loading=
"lazy
"
/>
}
<
div
className=
"h-[calc(100%-220px)] p-[1em] sm:p-[1.5em] bg-white flex flex-col dark:bg-[#131617] "
>
<
h4
className=
"text-sans font-[700] group-hover:text-primary text-sm sm:text-[18px] my-[.3em] leading-[1.4em] md:line-clamp-2"
>
...
...
components/base/Button/Button.tsx
View file @
c0269b0e
...
...
@@ -16,7 +16,7 @@ export default function Button({ children, size, disabled, className, loading, h
'px-4 py-2 text-[18px]'
:
size
===
'sm'
,
'px-6 py-2 text-[22px]'
:
size
===
'md'
,
'px-4 py-2 text-[15px]'
:
size
===
'icon'
,
'bg-secondary hover:bg-none
dark:hover
:bg-black dark:bg-black'
:
disabled
,
'bg-secondary hover:bg-none
hover:dark
:bg-black dark:bg-black'
:
disabled
,
'hover:bg-primary hover:text-white ease-in duration-100'
:
!
disabled
,
'w-full'
:
block
,
'bg-white dark:bg-[#131617] dark:text-white'
:
!
isPrimary
,
...
...
components/base/loader/Loader.tsx
View file @
c0269b0e
const
Loader
=
()
=>
{
return
(<
div
className=
"w-32 h-32 border-
6 p-[50px] border-b-white dark:border-b-black dark:border-white border-black animate-spin
"
></
div
>
return
(<
div
className=
"w-32 h-32 border-
[20px] p-[50px] border-b-white dark:border-b-black dark:border-white border-black animate-spin rounded-full
"
></
div
>
);
}
...
...
components/base/loader/loader.stories.tsx
0 → 100644
View file @
c0269b0e
import
{
StoryObj
,
Meta
}
from
"@storybook/react"
;
import
Loader
from
"./Loader"
;
const
meta
:
Meta
<
typeof
Loader
>
=
{
title
:
'Base/Loader'
,
component
:
Loader
}
export
default
meta
;
type
Story
=
StoryObj
<
typeof
meta
>
;
// export const Loader_story: Story = {
// render: (args) => {
// return (<div className="h-full dark:bg-black flex justify-center p-4">
// <Loader {...args} />
// </div>)
// },
// args: {
// }
// }
\ No newline at end of file
next.config.js
View file @
c0269b0e
...
...
@@ -29,7 +29,6 @@ module.exports = {
{
source
:
'/api/:path*'
,
destination
:
`
${
process
.
env
.
NEXT_PUBLIC_API_URL
}
/api/:path*`
,
}
];
},
...
...
pages/Home.tsx
View file @
c0269b0e
...
...
@@ -23,7 +23,9 @@ const Home = () => {
<
Heading
/>
<
div
className=
"flex flex-wrap gap-6 w-full dark:bg-black mt-4"
>
{
isLoading
&&
<
Loader
/>
isLoading
&&
<
div
className=
"w-full h-full dark:bg-black flex justify-center p-4"
>
<
Loader
/>
</
div
>
}
{
!
isLoading
&&
data
?.
length
===
0
&&
<
h2
className=
" capitalize dark:text-white text-center w-full text-2xl font-semibold py-5"
>
no Data found
</
h2
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment