Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit f29cc89

Browse files
milesrichardsonmildbyte
authored andcommitted
Support alternative logo text in BaseLayout (e.g. for white labeling)
1 parent 98a5d28 commit f29cc89

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

tdesign/src/Layout/BaseLayout/BaseLayout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface BaseLayoutProps {
1414
extraHeaderStyle?: SystemStyleObject;
1515
extraStyle?: SystemStyleObject;
1616
showHeader?: boolean;
17+
logoText?: string;
1718
}
1819

1920
export default ({
@@ -23,6 +24,7 @@ export default ({
2324
extraHeaderStyle = {},
2425
extraStyle = {},
2526
showHeader = true,
27+
logoText = "Splitgraph",
2628
}: BaseLayoutProps) => {
2729
const containerStyle = {
2830
// maxWidth: '100vw',
@@ -66,7 +68,7 @@ export default ({
6668
<LogoImage
6769
logoURL={"/static/splitgraph_logo_light_nocircle.svg"}
6870
/>
69-
<LogoText />
71+
<LogoText text={logoText} />
7072
</a>
7173
</HeaderLeft>
7274
<HeaderCenter>{headerCenter}</HeaderCenter>
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// @jsx jsx
22
// @ts-ignore
3-
import { jsx } from 'theme-ui';
4-
import * as React from 'react';
3+
import { jsx } from "theme-ui";
4+
import * as React from "react";
55

6-
export interface ILogoTextProps {}
6+
export interface ILogoTextProps {
7+
text?: string;
8+
}
79

8-
export default ({}: ILogoTextProps) => {
9-
return <span className="logo-text">Splitgraph</span>;
10+
export default ({ text = "Splitgraph" }: ILogoTextProps) => {
11+
return <span className="logo-text">{text}</span>;
1012
};

0 commit comments

Comments
 (0)