Skip to content

Conversation

@revolunet
Copy link
Collaborator

@revolunet revolunet commented Dec 15, 2022

Ajout composant Quote

Dans la doc DSFR ca parle de "couleurs d'accent" et de différentes tailles possibles, je n'ai pas compris de quoi il s'agit

export type QuoteProps = {
    className?: string;
    text: string;
    author?: string;
    source?: ReactNode;
    sourceUrl?: string;
    image?: string;
    size?: "md" | "lg" | "xl";
};

@garronej
Copy link
Collaborator

Pour l'accentuation tu peux voir là: https://main--ds-gouv.netlify.app/example/component/quote/

@revolunet revolunet marked this pull request as draft December 15, 2022 13:22
@revolunet
Copy link
Collaborator Author

revolunet commented Dec 15, 2022

Pour l'accent il suffit de spécifier une classe CSS type fr-quote--green-emeraude sur le noeud racine;
est-ce que passer className="fr-quote--green-emeraude" suffirait en terme d'API ?

@garronej
Copy link
Collaborator

garronej commented Dec 15, 2022

Pour l'accent il suffit de spécifier une classe CSS type fr-quote--green-emeraude sur le noeud racine;
est-ce que passer className="fr-quote--green-emeraude" suffirait en terme d'API ?

On a une opportunité de 💪🏻 ici.
On pourrait avoir une prop optionnelle accentColor qui prendrait comme type fr-quote--${infer T}.

Regarde un peut comme j'ai fait ici ou j'ai extract la severity.

@revolunet revolunet marked this pull request as ready for review December 15, 2022 14:01
Copy link
Collaborator

@garronej garronej left a comment

Choose a reason for hiding this comment

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

Merci beaucoup pour ton travail!

Julien Bouquillon and others added 2 commits December 16, 2022 00:45
Co-authored-by: Joseph Garrone <joseph.garrone.gj@gmail.com>
Signed-off-by: Julien Bouquillon <contact@revolunet.com>
@garronej garronej merged commit f7e66d7 into main Dec 16, 2022
@garronej garronej deleted the quote branch December 16, 2022 01:59
@garronej
Copy link
Collaborator

Merci @revolunet, you're the real MVP.
(Tu veux pas nous rejoinde au pôle logiciel libre? 😄)

sbourdon13 pushed a commit to sbourdon13/react-dsfr that referenced this pull request Aug 11, 2023
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