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

Ajout d'un composant textarea au design system #3246

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Conversation

mariheck
Copy link
Collaborator

No description provided.

@@ -38,7 +38,7 @@ export const Field = ({
}: Props) => {
return (
<div className={classNames(`flex-grow flex flex-col gap-3`, className)}>
<label htmlFor={htmlFor}>
<label htmlFor={htmlFor} className="ml-0 mb-0">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T'es sûre de toi? T'as pu tester les Field un peu partout?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En fait c'est pour conserver le style défini dans le DS. Dans l'app on a un style appliqué aux <label/>, et plutôt que de repasser tous les labels de l'app en revue, j'ai préféré assurer le maintien du style au niveau du composant.

import {useAutoResize} from './useAutoResize';
import {Textarea, TextareaProps} from './Textarea';

export const AutoResizedTextarea = forwardRef(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je suis pas sûr de faire 2 composants différents versus utiliser un booléen pour activer ou non l'option.
Mais testons

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mon idée première était en effet d'avoir juste une prop, mais ça m'embêtait un peu d'utiliser systématiquement un useState alors que pour un textarea classique ce n'était pas nécessaire

@mariheck mariheck merged commit 7200be6 into upcoming_develop Jul 11, 2024
14 of 21 checks passed
@mariheck mariheck deleted the ds-textarea branch July 11, 2024 09:53
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.

None yet

3 participants