Skip to content

Commit c442b04

Browse files
author
Julian Roeland
committed
:refactor: - refactor: changed styling
1 parent 7c52d4d commit c442b04

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

frontend/src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function App() {
9999
)}
100100
<ConfigContext.Provider
101101
value={{
102-
logo: <Logo />,
102+
logo: <Logo width="100%" />,
103103
}}
104104
>
105105
<NavigationContext.Provider

frontend/src/components/Logo/Logo.tsx

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
import { Button, Card, H3, Hr, useDialog } from "@maykin-ui/admin-ui";
1+
import { Button, Card, useDialog } from "@maykin-ui/admin-ui";
22
import { useCallback } from "react";
33

44
export type LogoProps = {
5-
width?: number;
5+
width?: number | string;
66
withDialog?: boolean;
77
};
88

9-
function LogoImage({ width }: { width: number }) {
10-
return <img src="/logo.svg" alt="Open Archiefbeheer Logo" width={width} />;
11-
}
12-
9+
/**
10+
* Implementation of the LogoImage with optional interactivity
11+
*/
1312
export function Logo({ width = 128, withDialog = false }: LogoProps) {
1413
const dialog = useDialog();
1514

1615
const onClick = useCallback(() => {
1716
dialog(
18-
"Versie",
17+
"Over",
1918
<Card>
20-
<LogoImage width={128} />
21-
<H3>Versie</H3>
22-
<Hr />
19+
<LogoImage width={"100%"} />
2320
</Card>,
21+
undefined,
22+
{ size: "s" },
2423
);
2524
}, [dialog]);
2625

@@ -32,3 +31,10 @@ export function Logo({ width = 128, withDialog = false }: LogoProps) {
3231
<LogoImage width={width} />
3332
);
3433
}
34+
35+
/**
36+
* Purely the image of the logo, without any interactivity.
37+
*/
38+
function LogoImage({ width }: { width: number | string }) {
39+
return <img src="/logo.svg" alt="Open Archiefbeheer Logo" width={width} />;
40+
}

0 commit comments

Comments
 (0)