calcom/components/ui/Badge.tsx
Omar López d194878bb2
Suggestion: let prettier sort imports order (#673)
* Suggestion: let prettier sort imports order

# Conflicts:
#	yarn.lock

* AUTO SORT ALL THE IMPORTS

* Linting

* Fixes test
2021-09-22 13:52:38 -06:00

27 lines
714 B
TypeScript

import React from "react";
import classNames from "@lib/classNames";
export type BadgeProps = {
variant: "default" | "success" | "gray";
} & JSX.IntrinsicElements["span"];
export const Badge = function Badge(props: BadgeProps) {
const { variant, className, ...passThroughProps } = props;
return (
<span
{...passThroughProps}
className={classNames(
"font-bold px-2 py-0.5 inline-block rounded-sm",
variant === "default" && "bg-yellow-100 text-yellow-800",
variant === "success" && "bg-green-100 text-green-800",
variant === "gray" && "bg-gray-200 text-gray-800",
className
)}>
{props.children}
</span>
);
};
export default Badge;