-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
113 additions
and
12 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const USER_LOCALSTORAGE_KEY = 'user'; | ||
export const ARTICLES_VIEW_LOCALSTORAGE_KEY = 'articles_view'; | ||
export const LOCAL_STORAGE_THEME_KEY = 'theme'; | ||
export const LOCAL_STORAGE_LAST_DESIGN_THEME_KEY = 'last_design'; |
7 changes: 7 additions & 0 deletions
7
src/shared/layouts/AppLoaderLayout/AppLoaderLayout.module.scss
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,7 @@ | ||
.header { | ||
padding: 16px; | ||
} | ||
|
||
.content { | ||
height: 100%; | ||
} |
16 changes: 16 additions & 0 deletions
16
src/shared/layouts/AppLoaderLayout/AppLoaderLayout.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,16 @@ | ||
import type { ComponentMeta, ComponentStory } from '@storybook/react'; | ||
|
||
import { AppLoaderLayout } from './AppLoaderLayout'; | ||
|
||
export default { | ||
title: 'shared/AppLoaderLayout', | ||
component: AppLoaderLayout, | ||
argTypes: { | ||
backgroundColor: { control: 'color' }, | ||
}, | ||
} as ComponentMeta<typeof AppLoaderLayout>; | ||
|
||
const Template: ComponentStory<typeof AppLoaderLayout> = (args) => <AppLoaderLayout {...args} />; | ||
|
||
export const Normal = Template.bind({}); | ||
Normal.args = {}; |
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,40 @@ | ||
import { memo } from 'react'; | ||
|
||
import { classNames } from '@/shared/lib/classNames'; | ||
import { HStack, VStack } from '@/shared/ui/redesigned/Stack'; | ||
import { Skeleton } from '@/shared/ui/redesigned/Skeleton'; | ||
|
||
import { MainLayout } from '../MainLayout/MainLayout'; | ||
import cls from './AppLoaderLayout.module.scss'; | ||
|
||
interface AppLoaderLayoutProps { | ||
className?: string; | ||
} | ||
|
||
export const AppLoaderLayout = memo((props: AppLoaderLayoutProps) => { | ||
const { className } = props; | ||
|
||
return ( | ||
<MainLayout | ||
className={classNames(cls.appLoaderLayout, {}, [className])} | ||
header={ | ||
<HStack className={cls.header}> | ||
<Skeleton width={40} height={40} borderRadius="50%" /> | ||
</HStack> | ||
} | ||
content={ | ||
<VStack gap="16" className={cls.content}> | ||
<Skeleton width="70%" height={32} borderRadius="16px" /> | ||
<Skeleton width="40%" height={20} borderRadius="16px" /> | ||
<Skeleton width="50%" height={20} borderRadius="16px" /> | ||
<Skeleton width="30%" height={32} borderRadius="16px" /> | ||
<Skeleton width="80%" height="40%" borderRadius="16px" /> | ||
<Skeleton width="80%" height="40%" borderRadius="16px" /> | ||
</VStack> | ||
} | ||
sidebar={<Skeleton width={220} height="100%" borderRadius="32px" />} | ||
/> | ||
); | ||
}); | ||
|
||
AppLoaderLayout.displayName = 'AppLoaderLayout'; |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { MainLayout } from './MainLayout/MainLayout'; | ||
export { StickyContentLayout } from './StickyContentLayout/StickyContentLayout'; | ||
export { AppLoaderLayout } from './AppLoaderLayout/AppLoaderLayout'; |
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