New source found from dndbeyond.com

This commit is contained in:
2025-07-09 01:00:11 -07:00
parent b7f7f4a655
commit 151590af7a
18 changed files with 150 additions and 45 deletions
@@ -15,6 +15,7 @@ export interface NumberDisplayProps extends HTMLAttributes<HTMLSpanElement> {
isModified?: boolean;
size?: "large";
numberFallback?: ReactNode;
useMph?: boolean;
}
export const NumberDisplay: FC<NumberDisplayProps> = ({
@@ -23,6 +24,7 @@ export const NumberDisplay: FC<NumberDisplayProps> = ({
isModified = false,
size,
numberFallback = "--",
useMph,
className,
...props
}) => {
@@ -37,6 +39,9 @@ export const NumberDisplay: FC<NumberDisplayProps> = ({
if (number && number % FEET_IN_MILES === 0) {
number = number / FEET_IN_MILES;
label = `mile${Math.abs(number) === 1 ? "" : "s"}`;
if (useMph) {
label = "mph";
}
} else {
label = "ft.";
}