minor style changes to team pages (#639)

* minor style changes to team pages

* more minor changes to team dashboard, added badge variant = gray

* added border to dropdown and removed blue focus ring on hover
This commit is contained in:
Peer_Rich authored and GitHub committed 2021-09-14 14:27:41 +01:00
1 parent 47b6e29333
commit 52e3b78875
8 files changed
+220 -41

No files matched your search

+3 -7
View File
@@ -13,17 +13,13 @@ export type AvatarProps = {
};
export default function Avatar({ imageSrc, gravatarFallbackMd5, size, alt, title, ...props }: AvatarProps) {
const className = classNames(
"border-2 border-gray-300 rounded-full",
props.className,
`h-${size} w-${size}`
);
const className = classNames("rounded-full", props.className, `h-${size} w-${size}`);
const avatar = (
<AvatarPrimitive.Root>
<AvatarPrimitive.Image
src={imageSrc}
alt={alt}
className={classNames("border-2 border-gray-300 rounded-full", `h-auto w-${size}`, props.className)}
className={classNames("rounded-full", `h-auto w-${size}`, props.className)}
/>
<AvatarPrimitive.Fallback delayMs={600}>
{gravatarFallbackMd5 && (
@@ -34,7 +30,7 @@ export default function Avatar({ imageSrc, gravatarFallbackMd5, size, alt, title
);
return title ? (
<Tooltip.Tooltip delayDuration="300">
<Tooltip.Tooltip delayDuration={300}>
<Tooltip.TooltipTrigger className="cursor-default">{avatar}</Tooltip.TooltipTrigger>
<Tooltip.Content className="p-2 rounded-sm text-sm bg-black text-white shadow-sm">
<Tooltip.Arrow />
+3 -2
View File
@@ -2,7 +2,7 @@ import classNames from "@lib/classNames";
import React from "react";
export type BadgeProps = {
variant: "default" | "success";
variant: "default" | "success" | "gray";
} & JSX.IntrinsicElements["span"];
export const Badge = function Badge(props: BadgeProps) {
@@ -12,9 +12,10 @@ export const Badge = function Badge(props: BadgeProps) {
<span
{...passThroughProps}
className={classNames(
"font-bold px-2 py-0.5 inline-block",
"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}
+4 -2
View File
@@ -12,6 +12,7 @@ export type ButtonProps = {
onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
StartIcon?: SVGComponent;
EndIcon?: SVGComponent;
shallow?: boolean;
} & (
| (Omit<JSX.IntrinsicElements["a"], "href"> & { href: LinkProps["href"] })
| (JSX.IntrinsicElements["button"] & { href?: never })
@@ -24,6 +25,7 @@ export const Button = function Button(props: ButtonProps) {
size = "base",
StartIcon,
EndIcon,
shallow,
// attributes propagated from `HTMLAnchorProps` or `HTMLButtonProps`
...passThroughProps
} = props;
@@ -58,7 +60,7 @@ export const Button = function Button(props: ButtonProps) {
color === "secondary" &&
(disabled
? "border border-gray-200 text-gray-400 bg-white"
: "border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 hover:text-gray-900 hover:shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-neutral-900"),
: "border border-gray-300 text-gray-700 bg-white hover:bg-gray-50 hover:text-gray-900 hover:shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-1 focus:ring-neutral-900 dark:bg-transparent dark:text-white dark:border-gray-800 dark:hover:bg-gray-900"),
color === "minimal" &&
(disabled
? "text-gray-400 bg-transparent"
@@ -109,7 +111,7 @@ export const Button = function Button(props: ButtonProps) {
</>
);
return props.href ? (
<Link passHref href={props.href}>
<Link passHref href={props.href} shallow={shallow && shallow}>
{element}
</Link>
) : (