New source found from dndbeyond.com

This commit is contained in:
2026-07-08 01:00:09 -07:00
parent 9a983a6d7b
commit dcefa0d2f2
2865 changed files with 222467 additions and 49053 deletions
+11 -2
View File
@@ -1,5 +1,6 @@
import clsx from "clsx";
import { FC } from "react";
import Color from "color";
import { CSSProperties, FC } from "react";
import {
Button as TtuiButton,
@@ -33,7 +34,14 @@ export const Button: FC<ButtonProps> = ({
const isCustomSize = size === "xx-small";
const isCustomVariant = variant === "builder" || variant === "builder-text";
const isCustomColor = color === "builder-green";
const { isDarkMode } = useCharacterTheme();
const { isDarkMode, themeColor } = useCharacterTheme();
let overrideStyles: CSSProperties = {};
if (isDarkMode && themed && variant === "solid" && size === "xx-small") {
overrideStyles = {
// Determine if the theme color is darker or lighter
color: Color(themeColor).isDark() ? "" : "black",
};
}
return (
<TtuiButton
@@ -53,6 +61,7 @@ export const Button: FC<ButtonProps> = ({
variant={!isCustomVariant ? variant : undefined}
// Children are included in props
color={!isCustomColor ? color : undefined}
style={overrideStyles}
{...props}
/>
);