Made colorText return JSX Element

This commit is contained in:
thepaperpilot 2022-07-17 21:32:32 -05:00
parent ba47847e39
commit 1345209461

View file

@ -316,6 +316,6 @@ export function createCollapsibleModifierSections(
* @param textToColor The content to change the color of * @param textToColor The content to change the color of
* @param color The color to change the content to look like. Defaults to the current theme's accent 2 variable. * @param color The color to change the content to look like. Defaults to the current theme's accent 2 variable.
*/ */
export function colorText(textToColor: string, color = "var(--accent2)"): string { export function colorText(textToColor: string, color = "var(--accent2)"): JSX.Element {
return `<span style="color: ${color}">${textToColor}</span>`; return <span style={{ color }}>${textToColor}</span>;
} }