-
Notifications
You must be signed in to change notification settings - Fork 85
feat: add Card component #32
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
Conversation
Signed-off-by: Julien Bouquillon <julien.bouquillon@sg.social.gouv.fr>
Signed-off-by: Julien Bouquillon <julien.bouquillon@sg.social.gouv.fr>
garronej
left a comment
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.
Thank you <3
src/Card.tsx
Outdated
| horizontal?: boolean; | ||
| size?: "small" | "medium" | "large"; // only affect the text | ||
| enlargeLink?: boolean; // make the whole card clickable | ||
| iconId?: FrIconClassName | RiIconClassName; // only needed when enlargeMode=true |
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.
What is enlargeMode? Wouldn't it make sence to express this in the type def?
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.
enlargeMode makes the whole card clickable; what do you mean by express this in the type def? ?
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.
my bad, its not enlargeMode but enlargeLink
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.
enlargeMode makes the whole card clickable; what do you mean by express this in the type def? ?
type EnlargedLink = {
enlargeLink: true;
iconId?: FrIconClassName | RiIconClassName;
};
type NotEnlargedLink = {
enlargeLink?: false;
iconId?: never;
}
type Props = .... & (EnlargedLink | NotEnlargedLink);
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.
Yay makes sense thanks
Co-authored-by: Joseph Garrone <joseph.garrone.gj@gmail.com> Signed-off-by: Julien Bouquillon <contact@revolunet.com>
Co-authored-by: Joseph Garrone <joseph.garrone.gj@gmail.com> Signed-off-by: Julien Bouquillon <contact@revolunet.com>
Co-authored-by: Joseph Garrone <joseph.garrone.gj@gmail.com> Signed-off-by: Julien Bouquillon <contact@revolunet.com>
Signed-off-by: Julien Bouquillon <julien.bouquillon@sg.social.gouv.fr>
|
Thank you for the adjustments! |
add Card component