File tree Expand file tree Collapse file tree 3 files changed +38
-25
lines changed Expand file tree Collapse file tree 3 files changed +38
-25
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ and this project adheres to
99
1010## [ Unreleased]
1111
12+ ## Changed
13+
14+ - 🔨(frontend) encapsulated title to its own component #474
15+
1216
1317## [ 1.8.2] - 2024-11-28
1418
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import Image from 'next/image';
22import React from 'react' ;
33import { useTranslation } from 'react-i18next' ;
44
5- import { Box , StyledLink , Text } from '@/components/' ;
5+ import { Box , StyledLink } from '@/components/' ;
66import { ButtonLogin } from '@/core/auth' ;
77import { LanguagePicker } from '@/features/language' ;
88import { useResponsiveStore } from '@/stores' ;
@@ -11,6 +11,7 @@ import { default as IconDocs } from '../assets/icon-docs.svg?url';
1111
1212import { DropdownMenu } from './DropdownMenu' ;
1313import { LaGaufre } from './LaGaufre' ;
14+ import Title from './Title/Title' ;
1415
1516export const Header = ( ) => {
1617 const { t } = useTranslation ( ) ;
@@ -45,30 +46,7 @@ export const Header = () => {
4546 $margin = { { top : 'auto' } }
4647 >
4748 < Image priority src = { IconDocs } alt = { t ( 'Docs Logo' ) } width = { 25 } />
48- < Text
49- $padding = "2px 3px"
50- $size = "8px"
51- $background = "#368bd6"
52- $color = "white"
53- $position = "absolute"
54- $radius = "5px"
55- $css = { `
56- bottom: 13px;
57- right: -17px;
58- ` }
59- >
60- BETA
61- </ Text >
62- < Text
63- $margin = "none"
64- as = "h2"
65- $color = "#000091"
66- $zIndex = { 1 }
67- $size = "1.30rem"
68- $css = "font-family: 'Marianne'"
69- >
70- { t ( 'Docs' ) }
71- </ Text >
49+ < Title />
7250 </ Box >
7351 </ StyledLink >
7452 </ Box >
Original file line number Diff line number Diff line change 1+ import { useTranslation } from 'react-i18next' ;
2+
3+ import { Text } from '@/components/' ;
4+
5+ const Title = ( ) => {
6+ const { t } = useTranslation ( ) ;
7+
8+ return (
9+ < >
10+ < Text
11+ $padding = "2px 3px"
12+ $size = "8px"
13+ $background = "#368bd6"
14+ $color = "white"
15+ $position = "absolute"
16+ $radius = "5px"
17+ $css = { `
18+ bottom: 13px;
19+ right: -17px;
20+ ` }
21+ >
22+ BETA
23+ </ Text >
24+ < Text $margin = "none" as = "h2" $color = "#000091" $zIndex = { 1 } $size = "1.30rem" >
25+ { t ( 'Docs' ) }
26+ </ Text >
27+ </ >
28+ ) ;
29+ } ;
30+
31+ export default Title ;
You can’t perform that action at this time.
0 commit comments