From 14d6c9e18a2c1c54e0f39e7af8eb1aef0dfac8cf Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Thu, 3 Mar 2022 15:00:20 +0800 Subject: [PATCH] feat(console): topbar (#310) * feat(console): topbar * refactor(console): move logo to assets folder --- packages/console/src/App.module.scss | 1 + packages/console/src/assets/images/logo.svg | 58 +++++++++++++++++++ .../Sidebar/components/Item/index.module.scss | 2 +- .../src/components/Topbar/index.module.scss | 17 ++++++ .../console/src/components/Topbar/index.tsx | 10 +++- packages/console/src/scss/_underscore.scss | 3 +- 6 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 packages/console/src/assets/images/logo.svg diff --git a/packages/console/src/App.module.scss b/packages/console/src/App.module.scss index e5904ea78..7460084c1 100644 --- a/packages/console/src/App.module.scss +++ b/packages/console/src/App.module.scss @@ -4,6 +4,7 @@ --color-on-surface-variant: #47464e; --color-primary: #4f37f9; --color-primary-90: #e5dfff; + --color-component-text: #191c1d; position: absolute; left: 0; top: 0; diff --git a/packages/console/src/assets/images/logo.svg b/packages/console/src/assets/images/logo.svg new file mode 100644 index 000000000..5adb0240b --- /dev/null +++ b/packages/console/src/assets/images/logo.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/console/src/components/Sidebar/components/Item/index.module.scss b/packages/console/src/components/Sidebar/components/Item/index.module.scss index b078ac64f..8bd8578c2 100644 --- a/packages/console/src/components/Sidebar/components/Item/index.module.scss +++ b/packages/console/src/components/Sidebar/components/Item/index.module.scss @@ -32,6 +32,6 @@ } .title { - @include _.subhead-1; + @include _.title-medium; } } diff --git a/packages/console/src/components/Topbar/index.module.scss b/packages/console/src/components/Topbar/index.module.scss index 2bc0feeb1..3909180df 100644 --- a/packages/console/src/components/Topbar/index.module.scss +++ b/packages/console/src/components/Topbar/index.module.scss @@ -6,4 +6,21 @@ padding: _.unit(3) _.unit(8); display: flex; align-items: center; + + img { + height: 30px; + } + + .line { + border: 1px solid #c4c7c7; + height: 24px; + width: 0; + flex: 0 0 0; + margin: 0 _.unit(3); + } + + .text { + @include _.title-medium; + color: var(--color-component-text); + } } diff --git a/packages/console/src/components/Topbar/index.tsx b/packages/console/src/components/Topbar/index.tsx index c16564d8b..6a205af4f 100644 --- a/packages/console/src/components/Topbar/index.tsx +++ b/packages/console/src/components/Topbar/index.tsx @@ -1,9 +1,17 @@ import React from 'react'; +import logo from '@/assets/images/logo.svg'; + import * as styles from './index.module.scss'; const Topbar = () => { - return
Admin Console
; + return ( +
+ +
+
Admin Console
+
+ ); }; export default Topbar; diff --git a/packages/console/src/scss/_underscore.scss b/packages/console/src/scss/_underscore.scss index 7387336b0..ebe027b99 100644 --- a/packages/console/src/scss/_underscore.scss +++ b/packages/console/src/scss/_underscore.scss @@ -9,7 +9,8 @@ justify-content: center; } -@mixin subhead-1 { + +@mixin title-medium { font-weight: 500; font-size: 16px; line-height: 24px;