This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit 0cb50f3 committed Sep 18, 2024 · 0 / 1
1 parent 40fc9a0 commit 0cb50f3 Copy full SHA for 0cb50f3
File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { getComponentClassName } from '@axa-fr/react-toolkit-core' ;
2
2
import React , { ComponentPropsWithoutRef , ReactNode } from 'react' ;
3
+ import classNames from 'classnames' ;
3
4
import FieldError from './FieldError' ;
4
5
import FieldForm from './FieldForm' ;
5
6
import MessageTypes from './MessageTypes' ;
@@ -53,7 +54,13 @@ const Field = ({
53
54
aria-label = { ariaLabelContainer } >
54
55
< div className = { classNameContainerLabel } >
55
56
< label
56
- className = "af-form__group-label"
57
+ className = { classNames (
58
+ {
59
+ 'af-form__group-label--required' :
60
+ classModifier . includes ( 'required' ) ,
61
+ } ,
62
+ 'af-form__group-label'
63
+ ) }
57
64
htmlFor = { isLabelContainerLinkedToInput ? id : null } >
58
65
{ label }
59
66
</ label >
Original file line number Diff line number Diff line change 18
18
& __group-label {
19
19
font-weight : normal ;
20
20
margin : 0 ;
21
- }
22
21
23
- & __group--required & __group-label {
24
- & :after {
22
+ & --required ::after {
25
23
content : ' *' ;
26
24
color : $color-red-error ;
27
25
}
You can’t perform that action at this time.
0 commit comments