Skip to content

Commit 73afc95

Browse files
committed
💄(frontend) Title header optional
On the DSFR instance the title will not be displayed anymore in favor of a icon that include the title. So we make the title optional, it will be configurable from the theme configuration.
1 parent 1149c0f commit 73afc95

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/backend/impress/configuration/theme/default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@
135135
"width": "32px",
136136
"height": "auto"
137137
},
138-
"alt": ""
138+
"alt": "",
139+
"withTitle": true
139140
}
140141
},
141142
"favicon": {
1.87 KB
Loading

src/frontend/apps/impress/src/features/header/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const Header = () => {
7676
{...icon}
7777
/>
7878
)}
79-
<Title headingLevel="h1" aria-hidden="true" />
79+
{icon?.withTitle && <Title headingLevel="h1" aria-hidden="true" />}
8080
</Box>
8181
</StyledLink>
8282
{!isDesktop ? (

src/frontend/apps/impress/src/features/header/types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Image from 'next/image';
22

3-
type Imagetype = React.ComponentProps<typeof Image>;
3+
type Imagetype = React.ComponentProps<typeof Image> & {
4+
withTitle: boolean;
5+
};
46

57
export interface HeaderType {
68
logo?: Imagetype;

0 commit comments

Comments
 (0)