-
Notifications
You must be signed in to change notification settings - Fork 112
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
New Metric Card Component #8987
Conversation
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.
Looks good! A few feedbacks:
- it seems to as a very generic "card" right? Could we rename it to "Card" (or equivalent) instead of "MetricCard"?
- You have a problem in package.json, seems like you installed sparkle as a dependency of sparkle
- to make the API a tiny bit more friendly could we have a general component that instantiates the others, to be used like:
<MetricCard
size="xs"
isLoading={false}
title="blabla"
content={<div>test</div>}
/>
Let me know if you need help with any of those!
footer: "s-flex s-items-center s-gap-2", | ||
loading: "s-flex s-items-center s-justify-start", | ||
}, | ||
} as const; |
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.
nit
: not sure we need the as const
here?
interface MetricCardRootProps | ||
extends BaseProps, | ||
VariantProps<typeof metricCardVariants> {} | ||
interface MetricCardHeaderProps extends BaseProps {} | ||
interface MetricCardTitleProps extends BaseProps {} | ||
interface MetricCardSubtitleProps extends BaseProps {} | ||
interface MetricCardContentProps extends Omit<BaseProps, "children"> { | ||
children?: React.ReactNode; | ||
isLoading?: boolean; | ||
} | ||
interface MetricCardFooterProps extends BaseProps {} |
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.
nit
: we usually try to have the interface directly above its associated component
63725ac
to
38723e1
Compare
0211220
to
a03e46f
Compare
- Standardize object and component formatting for consistency - Remove extraneous newlines and ensure proper newline at EOF in Card component files - Simplify export statements in components index file
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.
🔥 🔥
- Updated package version in package-lock.json and package.json for new release - Changes include synchronization of the version across both files
Description
New component to display metrics (already existing in the workspace but not as a component).
Risk
Deploy Plan
Merge
Deploy sparkle