File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ // @ts -check
2+
13import { themes } from "../../themes/index.js" ;
24
35/**
@@ -69,7 +71,6 @@ const fallbackColor = (color, fallbackColor) => {
6971 * @param {string= } args.border_color Card border color.
7072 * @param {string= } args.ring_color Card ring color.
7173 * @param {string= } args.theme Card theme.
72- * @param {string= } args.fallbackTheme Fallback theme.
7374 * @returns {CardColors } Card colors.
7475 */
7576const getCardColors = ( {
@@ -80,11 +81,13 @@ const getCardColors = ({
8081 border_color,
8182 ring_color,
8283 theme,
83- fallbackTheme = "default" ,
8484} ) => {
85- const defaultTheme = themes [ fallbackTheme ] ;
85+ const defaultTheme = themes [ "default" ] ;
8686 const isThemeProvided = theme !== null && theme !== undefined ;
87+
88+ // @ts -ignore
8789 const selectedTheme = isThemeProvided ? themes [ theme ] : defaultTheme ;
90+
8891 const defaultBorderColor =
8992 "border_color" in selectedTheme
9093 ? selectedTheme . border_color
You can’t perform that action at this time.
0 commit comments