|
|
@@ -49,6 +49,17 @@ const PrimaryItem: FC<PrimaryItemProps> = (props: PrimaryItemProps) => {
|
|
|
);
|
|
|
};
|
|
|
|
|
|
+const PrimaryItemSkeleton: FC = () => {
|
|
|
+ return (
|
|
|
+ <button
|
|
|
+ type="button"
|
|
|
+ className="d-block btn btn-primary"
|
|
|
+ >
|
|
|
+ <i className="material-icons">format_list_bulleted</i>
|
|
|
+ </button>
|
|
|
+ );
|
|
|
+};
|
|
|
+
|
|
|
type SecondaryItemProps = {
|
|
|
label: string,
|
|
|
href: string,
|
|
|
@@ -66,6 +77,15 @@ const SecondaryItem: FC<SecondaryItemProps> = memo((props: SecondaryItemProps) =
|
|
|
);
|
|
|
});
|
|
|
|
|
|
+// eslint-disable-next-line react/display-name
|
|
|
+const SecondaryItemSkeleton: FC = memo(() => {
|
|
|
+ return (
|
|
|
+ <a href='/' className="d-block btn btn-primary">
|
|
|
+ <i className="material-icons">format_list_bulleted</i>
|
|
|
+ </a>
|
|
|
+ );
|
|
|
+});
|
|
|
+
|
|
|
|
|
|
type Props = {
|
|
|
onItemSelected: (contents: SidebarContentsType) => void,
|
|
|
@@ -105,7 +125,20 @@ export const SidebarNav: FC<Props> = (props: Props) => {
|
|
|
|
|
|
export const SidebarNavSkeleton: FC = () => {
|
|
|
return (
|
|
|
- <div className="grw-sidebar-nav-skeleton"></div>
|
|
|
+ <div className="grw-sidebar-nav-skeleton">
|
|
|
+ <div className="grw-sidebar-nav-primary-container">
|
|
|
+ <PrimaryItemSkeleton />
|
|
|
+ <PrimaryItemSkeleton />
|
|
|
+ <PrimaryItemSkeleton />
|
|
|
+ <PrimaryItemSkeleton />
|
|
|
+ </div>
|
|
|
+ <div className="grw-sidebar-nav-secondary-container">
|
|
|
+ <SecondaryItemSkeleton />
|
|
|
+ <SecondaryItemSkeleton />
|
|
|
+ <SecondaryItemSkeleton />
|
|
|
+ <SecondaryItemSkeleton />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
);
|
|
|
};
|
|
|
|