-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task/sdet 223 appliquer les styles derreur quand il faut #176
Task/sdet 223 appliquer les styles derreur quand il faut #176
Conversation
c409a49
to
8bfb856
Compare
|
||
type DateSelectorProps = WithTestID<{ | ||
prefilled: Date; | ||
errorMessage?: string; | ||
onChange: (date: Date) => void; | ||
onUpdatedDate: (date: Date) => boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modifier le retour en 'void'
89b4c33
to
a54a7a0
Compare
a54a7a0
to
b96766e
Compare
function getPlaceholderColorsStyle(theme: Theme, state: State) { | ||
let textColor: string | undefined = theme.sw.colors.neutral[500]; | ||
if (state === 'empty-focused') { | ||
textColor = theme.sw.colors.primary.main; | ||
} | ||
return { | ||
textColor, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi renvoyer un objet alors que l'on veut renvoyer directement juste une couleur?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai voulu avoir le même type de retour que getTextInputStyle
qui a la même utilité mais au niveau des styles du TextInput
textColor = theme.sw.colors.neutral[800]; | ||
backgroundColor = theme.sw.colors.neutral[50]; | ||
borderColor = theme.sw.colors.primary.main; | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ça change pa grand chose mais pourquoi ne pas faire:
return {
textColor : theme.sw.colors.neutral[800],
backgroundColor : theme.sw.colors.neutral[50],
borderColor : theme.sw.colors.primary.main
}
Ca évite le break à chaque fois, et le return à la fin?
b96766e
to
9604d03
Compare
Enregistrement.2024-01-29.221206.mp4