From 1916f7741b87c8817185e0d5fc6b6526481787f0 Mon Sep 17 00:00:00 2001 From: mintsweet <0x1304570@gmail.com> Date: Tue, 16 Apr 2024 10:05:29 +0800 Subject: [PATCH] feat: support logo horizontal mode in onboard --- config-ui/src/components/logo/index.tsx | 6 +++-- config-ui/src/images/logo-horizontal.svg | 32 ++++++++++++++++++++++++ config-ui/src/routes/onboard/step-0.tsx | 2 +- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 config-ui/src/images/logo-horizontal.svg diff --git a/config-ui/src/components/logo/index.tsx b/config-ui/src/components/logo/index.tsx index bc68a8e65b3..1de4ab241c7 100644 --- a/config-ui/src/components/logo/index.tsx +++ b/config-ui/src/components/logo/index.tsx @@ -19,6 +19,7 @@ import styled from 'styled-components'; import LogoImg from '@/images/logo.svg'; +import LogoHorizontalImg from '@/images/logo-horizontal.svg'; const Wrapper = styled.div` display: flex; @@ -27,12 +28,13 @@ const Wrapper = styled.div` interface Props { style?: React.CSSProperties; + direction?: 'vertical' | 'horizontal'; } -export const Logo = ({ style }: Props) => { +export const Logo = ({ style, direction = 'vertical' }: Props) => { return ( - Logo + Logo ); }; diff --git a/config-ui/src/images/logo-horizontal.svg b/config-ui/src/images/logo-horizontal.svg new file mode 100644 index 00000000000..9f1faf1a355 --- /dev/null +++ b/config-ui/src/images/logo-horizontal.svg @@ -0,0 +1,32 @@ + + + + + + + + + \ No newline at end of file diff --git a/config-ui/src/routes/onboard/step-0.tsx b/config-ui/src/routes/onboard/step-0.tsx index e880c38571a..4a793d502f4 100644 --- a/config-ui/src/routes/onboard/step-0.tsx +++ b/config-ui/src/routes/onboard/step-0.tsx @@ -59,7 +59,7 @@ interface Props { title?: React.ReactNode; } -export const Step0 = ({ logo = , title = 'DevLake' }: Props) => { +export const Step0 = ({ logo = , title = 'DevLake' }: Props) => { const [operating, setOperating] = useState(false); const { step, records, done, projectName, plugin, setStep } = useContext(Context);