Skip to content
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

Merged

Conversation

AdrienCasta
Copy link
Contributor

Enregistrement.2024-01-29.221206.mp4

@AdrienCasta AdrienCasta requested a review from a team January 29, 2024 21:14
@AdrienCasta AdrienCasta self-assigned this Jan 29, 2024
@AdrienCasta AdrienCasta force-pushed the task/sdet-223-appliquer-les-styles-derreur-quand-il-faut branch from c409a49 to 8bfb856 Compare January 29, 2024 21:18

type DateSelectorProps = WithTestID<{
prefilled: Date;
errorMessage?: string;
onChange: (date: Date) => void;
onUpdatedDate: (date: Date) => boolean;
Copy link
Contributor

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'

@clementdejoie clementdejoie marked this pull request as ready for review January 30, 2024 11:06
@clementdejoie clementdejoie force-pushed the task/sdet-223-appliquer-les-styles-derreur-quand-il-faut branch from 89b4c33 to a54a7a0 Compare January 30, 2024 11:09
@AdrienCasta AdrienCasta force-pushed the task/sdet-223-appliquer-les-styles-derreur-quand-il-faut branch from a54a7a0 to b96766e Compare January 30, 2024 13:15
Comment on lines 105 to 111
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,
};
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines +120 to +122
textColor = theme.sw.colors.neutral[800];
backgroundColor = theme.sw.colors.neutral[50];
borderColor = theme.sw.colors.primary.main;
break;
Copy link
Contributor

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?

@AdrienCasta AdrienCasta force-pushed the task/sdet-223-appliquer-les-styles-derreur-quand-il-faut branch from b96766e to 9604d03 Compare January 30, 2024 14:23
@AdrienCasta AdrienCasta merged commit feb686d into main Jan 30, 2024
2 checks passed
@AdrienCasta AdrienCasta deleted the task/sdet-223-appliquer-les-styles-derreur-quand-il-faut branch January 30, 2024 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants