import React from "react"; import { filterAttrs } from "@arc-ui/community-utils/filter-attrs"; import { Grid, GridRow, GridCol } from "@arc-ui/components/Grid"; import { type AvatarProps, Avatar } from "@arc-ui/components/Avatar"; import { Heading } from "@arc-ui/components/Heading"; import { Text } from "@arc-ui/components/Text"; import styles from "./Author.module.css"; export const Author: React.FC = ({ name, title, avatar = {}, ...props }) => { const avatarSizes = ["s", "m", "l", "xl"]; avatar.size = avatarSizes.includes(avatar.size || "") ? avatar.size : "m"; const isLargeAvatar = avatar.size === "l" || avatar.size === "xl"; return (
{name} {title}
); }; export interface AuthorProps { /** * Name of the Author. */ name: string; /** * Job title of the Author. */ title: string; /** * Optional Avatar for the Author. */ avatar?: AvatarProps; }