The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/client/contexts/LayoutContext.ts

32 lines
733 B

import { createContext, useContext } from 'react';
export type SizeLayout = {
sidebar: string;
contextualBar: string;
}
export type LayoutContextValue = {
isEmbedded: boolean;
showTopNavbarEmbeddedLayout: boolean;
isMobile: boolean;
sidebar: any;
size: SizeLayout;
contextualBarExpanded: boolean;
contextualBarPosition: 'absolute' | 'relative' | 'fixed';
}
export const LayoutContext = createContext<LayoutContextValue>({
isEmbedded: false,
showTopNavbarEmbeddedLayout: false,
isMobile: false,
sidebar: {},
size: {
sidebar: '380px',
contextualBar: '380px',
},
contextualBarPosition: 'relative',
contextualBarExpanded: false,
});
export const useLayout = (): LayoutContextValue =>
useContext(LayoutContext);