diff --git a/desktop/app/src/chrome/ConsoleLogs.tsx b/desktop/app/src/chrome/ConsoleLogs.tsx index 83239b180..427595f68 100644 --- a/desktop/app/src/chrome/ConsoleLogs.tsx +++ b/desktop/app/src/chrome/ConsoleLogs.tsx @@ -92,7 +92,7 @@ export function ConsoleLogs() { const styles = useMemo(() => buildTheme(isSandy), [isSandy]); return ( - + - + + + ); } diff --git a/desktop/app/src/sandy-chrome/DesignComponentDemos.tsx b/desktop/app/src/sandy-chrome/DesignComponentDemos.tsx index 073eaee6a..6f69e3c1c 100644 --- a/desktop/app/src/sandy-chrome/DesignComponentDemos.tsx +++ b/desktop/app/src/sandy-chrome/DesignComponentDemos.tsx @@ -179,6 +179,11 @@ const demos: PreviewProps[] = [ 'boolean', 'specifies in which directions the container should scroll. If none is specified the container will scroll in both directions', ], + [ + 'padv / padh / pad', + 'see Container', + 'Padding will be applied to the child', + ], ], demos: { 'Basic usage': ( @@ -246,34 +251,34 @@ const demos: PreviewProps[] = [ {aFixedHeightBox} ), - 'Layout.Top + scrollable': ( + 'Layout.Top + Layout.ScrollContainer': ( - + {aFixedHeightBox} - {largeChild} + {largeChild} ), - 'Layout.Left + scrollable': ( + 'Layout.Left + Layout.ScrollContainer': ( - + {aFixedWidthBox} - {largeChild} + {largeChild} ), - 'Layout.Right + scrollable': ( + 'Layout.Right + Layout.ScrollContainer': ( - - {largeChild} + + {largeChild} {aFixedWidthBox} ), - 'Layout.Bottom + scrollable': ( + 'Layout.Bottom + Layout.ScrollContainer': ( - - {largeChild} + + {largeChild} {aFixedHeightBox} diff --git a/desktop/app/src/sandy-chrome/LeftSidebar.tsx b/desktop/app/src/sandy-chrome/LeftSidebar.tsx index 86b47d5ed..9f0187684 100644 --- a/desktop/app/src/sandy-chrome/LeftSidebar.tsx +++ b/desktop/app/src/sandy-chrome/LeftSidebar.tsx @@ -15,7 +15,11 @@ import {Button, Tooltip, Typography} from 'antd'; import {InfoCircleOutlined} from '@ant-design/icons'; export const LeftSidebar: React.FC = ({children}) => ( - + {children} ); diff --git a/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx b/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx index 920603204..c6369e0df 100644 --- a/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/AppInspect.tsx @@ -57,15 +57,13 @@ export function AppInspect() { - - - {selectedDevice ? ( - - ) : ( - - )} - - + + {selectedDevice ? ( + + ) : ( + + )} + ); diff --git a/desktop/app/src/ui/components/Layout.tsx b/desktop/app/src/ui/components/Layout.tsx index a8b53b265..e2a53757e 100644 --- a/desktop/app/src/ui/components/Layout.tsx +++ b/desktop/app/src/ui/components/Layout.tsx @@ -116,25 +116,26 @@ const ScrollContainer = ({ children, horizontal, vertical, + padv, + padh, + pad, ...rest }: React.HTMLAttributes & { horizontal?: boolean; vertical?: boolean; -}) => { +} & PaddingProps) => { const axis = horizontal && !vertical ? 'x' : !horizontal && vertical ? 'y' : 'both'; return ( - {children} + + {children} + ) as any; }; type SplitLayoutProps = { - /** - * If set, the dynamically sized pane will get scrollbars when needed - */ - scrollable?: boolean; /** * If set, items will be centered over the orthogonal direction, if false (the default) items will be stretched. */ @@ -150,8 +151,7 @@ function renderSplitLayout( // eslint-disable-next-line const isSandy = useIsSandy(); if (!isSandy) return renderLayout(props, direction === 'row', grow === 1); - let [child1, child2] = props.children; - if (props.scrollable) child2 = {child2}; + const [child1, child2] = props.children; return ( {child1} diff --git a/desktop/plugins/sections/src/index.tsx b/desktop/plugins/sections/src/index.tsx index 00318c15e..95b61628a 100644 --- a/desktop/plugins/sections/src/index.tsx +++ b/desktop/plugins/sections/src/index.tsx @@ -256,7 +256,7 @@ export function Component() { )} - + - + {focusedTreeGeneration && ( - + + + )}