Rename BadgeButton to PillButton

This commit is contained in:
Gregory Schier
2025-11-09 08:18:26 -08:00
parent d7a7a64ec4
commit 75dc82570b
5 changed files with 19 additions and 18 deletions

View File

@@ -2,7 +2,7 @@ import classNames from 'classnames';
import type { ButtonProps } from './Button';
import { Button } from './Button';
export function BadgeButton({ className, ...props }: ButtonProps) {
export function PillButton({ className, ...props }: ButtonProps) {
return (
<Button
size="2xs"

View File

@@ -9,6 +9,7 @@ export interface TooltipProps {
content: ReactNode;
tabIndex?: number;
size?: 'md' | 'lg';
className?: string;
}
const hiddenStyles: CSSProperties = {
@@ -19,7 +20,7 @@ const hiddenStyles: CSSProperties = {
opacity: 0,
};
export function Tooltip({ children, content, tabIndex, size = 'md' }: TooltipProps) {
export function Tooltip({ children, className, content, tabIndex, size = 'md' }: TooltipProps) {
const [isOpen, setIsOpen] = useState<CSSProperties>();
const triggerRef = useRef<HTMLButtonElement>(null);
const tooltipRef = useRef<HTMLDivElement>(null);
@@ -95,7 +96,7 @@ export function Tooltip({ children, content, tabIndex, size = 'md' }: TooltipPro
role="button"
aria-describedby={isOpen ? id.current : undefined}
tabIndex={tabIndex ?? -1}
className="flex-grow-0 inline-flex items-center"
className={classNames(className, 'flex-grow-0 flex items-center')}
onClick={handleToggleImmediate}
onMouseEnter={handleOpen}
onMouseLeave={handleClose}