-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added loading screen placeholder and removed old icons
- Loading branch information
1 parent
5e8d680
commit 3927f7b
Showing
11 changed files
with
169 additions
and
103 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
|
||
import { Skeleton } from '@shared/ui/skeleton'; | ||
|
||
export const AppLoadingSkeleton = () => { | ||
return ( | ||
<div className="flex flex-col gap-2 w-full p-2"> | ||
<Skeleton className="h-10 min-w-32 w-full" /> | ||
<Skeleton className="h-32 min-w-32 w-full" /> | ||
<Skeleton className="h-32 min-w-32 w-full" /> | ||
<Skeleton className="h-48 min-w-32 w-full" /> | ||
<Skeleton className="h-64 min-w-32 w-full" /> | ||
</div> | ||
); | ||
}; |
21 changes: 21 additions & 0 deletions
21
src/popup/components/_stories/AppLoadingSkeleton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Meta, StoryObj } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import { AppLoadingSkeleton } from '../AppLoadingSkeleton'; | ||
|
||
export default { | ||
title: 'popup/components/AppLoadingSkeleton', | ||
component: AppLoadingSkeleton, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
} satisfies Meta<typeof AppLoadingSkeleton>; | ||
|
||
type Story = StoryObj<Meta<typeof AppLoadingSkeleton>>; | ||
|
||
export const Default: Story = { | ||
render: () => <AppLoadingSkeleton />, | ||
parameters: { | ||
layout: 'centered', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as ProgressPrimitive from '@radix-ui/react-progress'; | ||
import * as React from 'react'; | ||
|
||
import { cn } from '@shared/utils'; | ||
|
||
const Progress = React.forwardRef< | ||
React.ElementRef<typeof ProgressPrimitive.Root>, | ||
React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> | ||
>(({ className, value, ...props }, ref) => ( | ||
<ProgressPrimitive.Root | ||
ref={ref} | ||
className={cn( | ||
'relative h-2 w-full overflow-hidden rounded-full bg-primary/20', | ||
className, | ||
)} | ||
{...props} | ||
> | ||
<ProgressPrimitive.Indicator | ||
className="h-full w-full flex-1 bg-primary transition-all" | ||
style={{ transform: `translateX(-${100 - (value || 0)}%)` }} | ||
/> | ||
</ProgressPrimitive.Root> | ||
)); | ||
Progress.displayName = ProgressPrimitive.Root.displayName; | ||
|
||
export { Progress }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
|
||
import { cn } from '@shared/utils'; | ||
|
||
function Skeleton({ | ||
className, | ||
...props | ||
}: React.HTMLAttributes<HTMLDivElement>) { | ||
return ( | ||
<div | ||
className={cn('animate-pulse rounded-md bg-primary/10', className)} | ||
{...props} | ||
/> | ||
); | ||
} | ||
|
||
export { Skeleton }; |
Oops, something went wrong.