mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
e810eab39f
commit
b7974827d2
786 files changed
+14567
-24066
No files matched your search
@@ -0,0 +1,15 @@
|
||||
.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;
|
||||
|
||||
&.small {
|
||||
font-size: $font-size-small;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import "./badge.scss"
|
||||
|
||||
import React from "react";
|
||||
import { cssNames } from "../../utils/cssNames";
|
||||
import { TooltipDecoratorProps, withTooltip } from "../tooltip";
|
||||
|
||||
interface Props extends React.HTMLAttributes<any>, TooltipDecoratorProps {
|
||||
label: React.ReactNode;
|
||||
small?: boolean;
|
||||
}
|
||||
|
||||
@withTooltip
|
||||
export class Badge extends React.Component<Props> {
|
||||
render() {
|
||||
const { className, label, small, children, ...elemProps } = this.props;
|
||||
return (
|
||||
<span className={cssNames("Badge", { small }, className)} {...elemProps}>
|
||||
{label}
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./badge"
|
||||
Reference in new issue
Block a user