Skip to content

Commit

Permalink
page layout
Browse files Browse the repository at this point in the history
Signed-off-by: Hailong Cui <[email protected]>
  • Loading branch information
Hailong-am committed Apr 21, 2024
1 parent 5e77d17 commit 7a840cd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export const WorkspaceOverview = (props: WorkspaceOverviewProps) => {
</EuiFlexGroup>
) : null}
</EuiPageHeader>
<EuiPageContent>
<EuiPageContent color="transparent" hasBorder={true}>
<EuiTabbedContent
tabs={tabs}
initialSelectedTab={tabs[0]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { EuiTitle, EuiFlexItem, EuiCard, EuiPanel, EuiFlexGroup } from '@elastic/eui';
import {
EuiTitle,
EuiFlexItem,
EuiCard,
EuiFlexGroup,
EuiPage,
EuiPanel,
EuiPageContent,
} from '@elastic/eui';
import React from 'react';
import { useObservable } from 'react-use';
import { of } from 'rxjs';
Expand All @@ -17,24 +25,26 @@ export const WorkspaceOverviewContent = () => {
const currentWorkspace = useObservable(workspaces ? workspaces.currentWorkspace$ : of(null));

return (
<EuiPanel hasBorder={false} color="transparent">
<EuiFlexGroup>
<EuiFlexItem grow={2}>
<EuiCard
layout="horizontal"
title="About"
titleSize="xs"
description={currentWorkspace?.description || ''}
/>
</EuiFlexItem>
<EuiFlexItem grow={8}>
<EuiPanel>
<EuiTitle size="xs">
<span>Recent items</span>
</EuiTitle>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPanel>
<EuiPage paddingSize="m">
<EuiPageContent hasShadow={false} borderRadius={'none'}>
<EuiFlexGroup>
<EuiFlexItem grow={2}>
<EuiCard
layout="horizontal"
title="About"
titleSize="xs"
description={currentWorkspace?.description || ''}
/>
</EuiFlexItem>
<EuiFlexItem grow={8}>
<EuiPanel>
<EuiTitle size="xs">
<span>Recent items</span>
</EuiTitle>
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</EuiPageContent>
</EuiPage>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export const WorkspaceOverviewSettings = ({
workspaceConfigurableApps$,
}: WorkspaceOverviewProps) => {
return (
<WorkspaceUpdater hideTitle={true} workspaceConfigurableApps$={workspaceConfigurableApps$} />
<WorkspaceUpdater
hideTitle={true}
maxWidth={'100%'}
workspaceConfigurableApps$={workspaceConfigurableApps$}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
export interface WorkspaceUpdaterProps {
workspaceConfigurableApps$?: BehaviorSubject<PublicAppInfo[]>;
hideTitle?: boolean;
maxWidth?: number | string;
}

function getFormDataFromWorkspace(
Expand Down Expand Up @@ -127,7 +128,7 @@ export const WorkspaceUpdater = (props: WorkspaceUpdaterProps) => {
paddingSize="none"
color="subdued"
hasShadow={false}
style={{ width: '100%', maxWidth: 1000 }}
style={{ width: '100%', maxWidth: props.maxWidth ? props.maxWidth : 1000 }}
>
{application && (
<WorkspaceForm
Expand Down

0 comments on commit 7a840cd

Please sign in to comment.