🎨 Format with prettier
This commit is contained in:
@@ -9,21 +9,21 @@ interface DashboardSidebarProps extends DashboardSidebarInnerProps {
|
||||
}
|
||||
|
||||
export const DashboardSidebar = ({ location, isGridstackReady }: DashboardSidebarProps) => (
|
||||
<Card
|
||||
withBorder
|
||||
w={300}
|
||||
style={{
|
||||
background: 'none',
|
||||
borderStyle: 'dashed',
|
||||
}}
|
||||
>
|
||||
{isGridstackReady && <SidebarInner location={location} />}
|
||||
</Card>
|
||||
);
|
||||
<Card
|
||||
withBorder
|
||||
w={300}
|
||||
style={{
|
||||
background: 'none',
|
||||
borderStyle: 'dashed',
|
||||
}}
|
||||
>
|
||||
{isGridstackReady && <SidebarInner location={location} />}
|
||||
</Card>
|
||||
);
|
||||
|
||||
interface DashboardSidebarInnerProps {
|
||||
location: 'right' | 'left';
|
||||
}
|
||||
interface DashboardSidebarInnerProps {
|
||||
location: 'right' | 'left';
|
||||
}
|
||||
|
||||
// Is Required because of the gridstack main area width.
|
||||
const SidebarInner = ({ location }: DashboardSidebarInnerProps) => {
|
||||
@@ -32,16 +32,17 @@ const SidebarInner = ({ location }: DashboardSidebarInnerProps) => {
|
||||
const minRow = useMinRowForFullHeight(refs.wrapper);
|
||||
|
||||
return (
|
||||
<div
|
||||
className="grid-stack grid-stack-sidebar"
|
||||
style={{ transitionDuration: '0s', height: '100%' }}
|
||||
data-sidebar={location}
|
||||
// eslint-disable-next-line react/no-unknown-property
|
||||
gs-min-row={minRow}
|
||||
ref={refs.wrapper}
|
||||
>
|
||||
<WrapperContent apps={apps} refs={refs} widgets={widgets} />
|
||||
</div>);
|
||||
<div
|
||||
className="grid-stack grid-stack-sidebar"
|
||||
style={{ transitionDuration: '0s', height: '100%' }}
|
||||
data-sidebar={location}
|
||||
// eslint-disable-next-line react/no-unknown-property
|
||||
gs-min-row={minRow}
|
||||
ref={refs.wrapper}
|
||||
>
|
||||
<WrapperContent apps={apps} refs={refs} widgets={widgets} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const useMinRowForFullHeight = (wrapperRef: RefObject<HTMLDivElement>) =>
|
||||
|
||||
Reference in New Issue
Block a user