Web:Studio:Added LoaderSubmenu.
This commit is contained in:
parent
34f223d67c
commit
a2c1e836c0
@ -8,7 +8,7 @@ import config from "../../../../../../package.json";
|
||||
|
||||
import Customization from "./customization";
|
||||
import WhiteLabel from "./whitelabel";
|
||||
import AppLoader from "@appserver/common/components/AppLoader";
|
||||
import LoaderSubmenu from "./sub-components/loaderSubmenu";
|
||||
|
||||
const SubmenuCommon = (props) => {
|
||||
const { t, history } = props;
|
||||
@ -34,7 +34,7 @@ const SubmenuCommon = (props) => {
|
||||
if (currentTab !== -1) {
|
||||
setCurrentTab(currentTab);
|
||||
}
|
||||
setIsLoading(true);
|
||||
//setIsLoading(true);
|
||||
}, []);
|
||||
|
||||
const onSelect = (e) => {
|
||||
@ -46,9 +46,9 @@ const SubmenuCommon = (props) => {
|
||||
)
|
||||
);
|
||||
};
|
||||
//TODO: Loader
|
||||
return !isLoading ? (
|
||||
<AppLoader />
|
||||
//TODO: isLoading
|
||||
return isLoading ? (
|
||||
<LoaderSubmenu />
|
||||
) : (
|
||||
<Submenu
|
||||
data={data}
|
||||
|
@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import Loaders from "@appserver/common/components/Loaders";
|
||||
import { isTablet } from "react-device-detect";
|
||||
|
||||
const StyledLoader = styled.div`
|
||||
margin-top: -4px;
|
||||
|
||||
.loader {
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
margin-top: -9px;
|
||||
}
|
||||
|
||||
${isTablet &&
|
||||
css`
|
||||
margin-top: -9px;
|
||||
`}
|
||||
`;
|
||||
|
||||
const LoaderSubmenu = () => {
|
||||
return (
|
||||
<StyledLoader>
|
||||
<Loaders.Rectangle width="100px" height="28px" className="loader" />
|
||||
<Loaders.Rectangle width="100px" height="28px" />
|
||||
</StyledLoader>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoaderSubmenu;
|
Loading…
Reference in New Issue
Block a user