Display node column in pods list (#1832)

* Display node column in pods list

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>

* Adding flat option to <Badge />

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Removing <Span /> component

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Using badge with tooltips in pods list

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Lauri NevalaandAlex Andreev authored and GitHub committed 2020-12-22 15:45:30 +03:00
1 parent d281ff4a21
commit 11c611dabe
4 files changed
+38 -11

No files matched your search

+7 -4
View File
@@ -1,14 +1,17 @@
.Badge {
display: inline-block;
background: $colorVague;
color: $textColorSecondary;
border-radius: $radius;
padding: .2em .4em;
white-space: nowrap;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
&:not(.flat) {
background: $colorVague;
color: $textColorSecondary;
border-radius: $radius;
padding: .2em .4em;
}
&.small {
font-size: $font-size-small;
}
+3 -2
View File
@@ -6,16 +6,17 @@ import { TooltipDecoratorProps, withTooltip } from "../tooltip";
export interface BadgeProps extends React.HTMLAttributes<any>, TooltipDecoratorProps {
small?: boolean;
flat?: boolean;
label?: React.ReactNode;
}
@withTooltip
export class Badge extends React.Component<BadgeProps> {
render() {
const { className, label, small, children, ...elemProps } = this.props;
const { className, label, small, flat, children, ...elemProps } = this.props;
return <>
<span className={cssNames("Badge", { small }, className)} {...elemProps}>
<span className={cssNames("Badge", { small, flat }, className)} {...elemProps}>
{label}
{children}
</span>