You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by mi...@apache.org on 2024/01/29 03:00:20 UTC

(incubator-devlake) branch fix-styles created (now 57f9312e5)

This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a change to branch fix-styles
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


      at 57f9312e5 fix: adjust the style for page header

This branch includes the following new commits:

     new 57f9312e5 fix: adjust the style for page header

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(incubator-devlake) 01/01: fix: adjust the style for page header

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mintsweet pushed a commit to branch fix-styles
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 57f9312e5f78a068cefdf62c47c76d8b1327a7a3
Author: mintsweet <0x...@gmail.com>
AuthorDate: Mon Jan 29 16:00:07 2024 +1300

    fix: adjust the style for page header
---
 config-ui/src/components/page-header/index.tsx |  4 +++-
 config-ui/src/components/page-header/styled.ts |  4 ++++
 config-ui/src/routes/blueprint/home/index.tsx  | 12 ++++++------
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/config-ui/src/components/page-header/index.tsx b/config-ui/src/components/page-header/index.tsx
index c4de583d0..3320f2e3f 100644
--- a/config-ui/src/components/page-header/index.tsx
+++ b/config-ui/src/components/page-header/index.tsx
@@ -27,10 +27,11 @@ interface Props {
     path: string;
   }>;
   extra?: React.ReactNode;
+  description?: string;
   children: React.ReactNode;
 }
 
-export const PageHeader = ({ breadcrumbs, extra, children }: Props) => {
+export const PageHeader = ({ breadcrumbs, extra, description, children }: Props) => {
   return (
     <S.Container>
       <S.Title>
@@ -46,6 +47,7 @@ export const PageHeader = ({ breadcrumbs, extra, children }: Props) => {
         </S.Breadcrumbs>
         <S.Extra>{extra}</S.Extra>
       </S.Title>
+      <S.Description>{description}</S.Description>
       <S.Content>{children}</S.Content>
     </S.Container>
   );
diff --git a/config-ui/src/components/page-header/styled.ts b/config-ui/src/components/page-header/styled.ts
index 8dbd5bbb4..3dd132e69 100644
--- a/config-ui/src/components/page-header/styled.ts
+++ b/config-ui/src/components/page-header/styled.ts
@@ -24,6 +24,10 @@ export const Title = styled.div`
   display: flex;
   align-items: center;
   justify-content: space-between;
+`;
+
+export const Description = styled.p`
+  margin-top: 12px;
   margin-bottom: 36px;
 `;
 
diff --git a/config-ui/src/routes/blueprint/home/index.tsx b/config-ui/src/routes/blueprint/home/index.tsx
index 44f1c0b3e..4a4853c4b 100644
--- a/config-ui/src/routes/blueprint/home/index.tsx
+++ b/config-ui/src/routes/blueprint/home/index.tsx
@@ -94,11 +94,14 @@ export const BlueprintHomePage = () => {
         { name: 'Advanced', path: PATHS.BLUEPRINTS() },
         { name: 'Blueprints', path: PATHS.BLUEPRINTS() },
       ]}
+      extra={
+        <Button type="primary" icon={<PlusOutlined />} onClick={handleShowDialog}>
+          New Blueprint
+        </Button>
+      }
+      description="This is a complete list of all Blueprints you have created, whether they belong to Projects or not."
     >
       <Flex vertical gap="middle">
-        <p style={{ margin: 0 }}>
-          This is a complete list of all Blueprints you have created, whether they belong to Projects or not.
-        </p>
         <Flex justify="space-between">
           <Radio.Group optionType="button" value={type} onChange={({ target: { value } }) => setType(value)}>
             <Radio value="all">All</Radio>
@@ -108,9 +111,6 @@ export const BlueprintHomePage = () => {
               </Radio>
             ))}
           </Radio.Group>
-          <Button type="primary" icon={<PlusOutlined />} onClick={handleShowDialog}>
-            New Blueprint
-          </Button>
         </Flex>
         <Table
           rowKey="id"