Repository navigation
refactor(new-webui): Remove redundant StatCard and DetailsCard.
#1088
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
Changes from 1 commit
0ccee94
81d9e33
3267a09
b419a70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { | ||
| theme, | ||
| Typography, | ||
| } from "antd"; | ||
|
|
||
|
|
||
| const {Text} = Typography; | ||
|
|
||
| interface StatCardProps { | ||
| children: React.ReactNode; | ||
| fontSize?: string; | ||
| color?: string; | ||
| } | ||
|
|
||
| /** | ||
| * A text component for displaying statistical values in `DashboardCard`. | ||
|
hoophalab marked this conversation as resolved.
Resolved
|
||
| * | ||
| * @param props | ||
| * @param props.children | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this take children or explicit stat string? |
||
| * @param props.color | ||
| * @param props.fontSize | ||
| * @return | ||
| */ | ||
| const Stat = ({children, color, fontSize}: StatCardProps) => { | ||
| const {token} = theme.useToken(); | ||
| return ( | ||
| <Text style={{color: color ?? token.colorTextSecondary, fontSize: fontSize ?? "1.4rem"}}> | ||
| {children} | ||
| </Text> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
| export default Stat; | ||
This file was deleted.
This file was deleted.
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think junhao wanted me to change this by passing class Name, but I think this is also good with the grid setting explicit on the outside. i am good with this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see... thanks for the context. This makes sense. I made the change because the other grids are explicitly set on the outside. We should check with Junhao later about whether all cards should have a className. He needs this for cloud as well. |
Uh oh!
There was an error while loading. Please reload this page.