File tree 4 files changed +7
-5
lines changed
site/src/components/Dashboard 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import { appearance } from "api/queries/appearance";
20
20
21
21
interface Appearance {
22
22
config : AppearanceConfig ;
23
+ isPreview : boolean ;
23
24
setPreview : ( config : AppearanceConfig ) => void ;
24
25
}
25
26
@@ -59,6 +60,7 @@ export const DashboardProvider: FC<PropsWithChildren> = ({ children }) => {
59
60
appearance : {
60
61
config : configPreview ?? appearanceQuery . data ,
61
62
setPreview : setConfigPreview ,
63
+ isPreview : configPreview !== undefined ,
62
64
} ,
63
65
} }
64
66
>
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export const ServiceBanner: React.FC = () => {
15
15
< ServiceBannerView
16
16
message = { message }
17
17
backgroundColor = { background_color }
18
- preview = { appearance . preview }
18
+ isPreview = { appearance . isPreview }
19
19
/>
20
20
) ;
21
21
} else {
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ export const Preview: Story = {
20
20
args : {
21
21
message : "weeeee" ,
22
22
backgroundColor : "#000000" ,
23
- preview : true ,
23
+ isPreview : true ,
24
24
} ,
25
25
} ;
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import { hex } from "color-convert";
7
7
export interface ServiceBannerViewProps {
8
8
message : string ;
9
9
backgroundColor : string ;
10
- preview : boolean ;
10
+ isPreview : boolean ;
11
11
}
12
12
13
13
export const ServiceBannerView : React . FC < ServiceBannerViewProps > = ( {
14
14
message,
15
15
backgroundColor,
16
- preview ,
16
+ isPreview ,
17
17
} ) => {
18
18
const styles = useStyles ( ) ;
19
19
// We don't want anything funky like an image or a heading in the service
@@ -34,7 +34,7 @@ export const ServiceBannerView: React.FC<ServiceBannerViewProps> = ({
34
34
className = { styles . container }
35
35
style = { { backgroundColor : backgroundColor } }
36
36
>
37
- { preview && < Pill text = "Preview" type = "info" lightBorder /> }
37
+ { isPreview && < Pill text = "Preview" type = "info" lightBorder /> }
38
38
< div
39
39
className = { styles . centerContent }
40
40
style = { {
You can’t perform that action at this time.
0 commit comments