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:
1 parent
47b6e29333
commit
52e3b78875
8 files changed
+220
-41
No files matched your search
@@ -148,10 +148,10 @@ const AvailabilityPage = ({ profile, eventType, workingHours }: AvailabilityPage
|
||||
image: user.avatar,
|
||||
}))
|
||||
)}
|
||||
size={16}
|
||||
size={10}
|
||||
truncateAfter={3}
|
||||
/>
|
||||
<h2 className="font-medium text-gray-500 dark:text-gray-300">{profile.name}</h2>
|
||||
<h2 className="font-medium text-gray-500 dark:text-gray-300 mt-3">{profile.name}</h2>
|
||||
<h1 className="mb-4 text-3xl font-semibold text-gray-800 dark:text-white">
|
||||
{eventType.title}
|
||||
</h1>
|
||||
|
||||
@@ -5,6 +5,7 @@ import Avatar from "@components/ui/Avatar";
|
||||
import { ArrowRightIcon } from "@heroicons/react/outline";
|
||||
import classnames from "classnames";
|
||||
import { ArrowLeftIcon } from "@heroicons/react/solid";
|
||||
import Button from "@components/ui/Button";
|
||||
|
||||
const Team = ({ team }) => {
|
||||
const Member = ({ member }) => {
|
||||
@@ -68,11 +69,9 @@ const Team = ({ team }) => {
|
||||
<Members members={team.members} />
|
||||
{team.eventTypes.length && (
|
||||
<aside className="text-center dark:text-white mt-8">
|
||||
<Link href={`/team/${team.slug}`} shallow={true}>
|
||||
<a>
|
||||
<ArrowLeftIcon className="h-6 w-6 inline text-neutral-500" /> Go back
|
||||
</a>
|
||||
</Link>
|
||||
<Button color="secondary" href={`/team/${team.slug}`} shallow={true} StartIcon={ArrowLeftIcon}>
|
||||
Go back
|
||||
</Button>
|
||||
</aside>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -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 />
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user