Skip to content

Refactor: Fix docstring for getCardColors utils function #3011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions src/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@ const flexLayout = ({ items, gap, direction, sizes = [] }) => {
});
};

/**
* Object containing card colors.
* @typedef {{
* titleColor: string | string[];
* iconColor: string | string[];
* textColor: string | string[];
* bgColor: string | string[];
* borderColor: string | string[];
* ringColor: string | string[];
* }} CardColors
*/

/**
* Returns theme based colors with proper overrides and defaults.
*
Expand All @@ -203,14 +215,7 @@ const flexLayout = ({ items, gap, direction, sizes = [] }) => {
* @param {string=} args.ring_color Card ring color.
* @param {string=} args.theme Card theme.
* @param {string=} args.fallbackTheme Fallback theme.
* @returns {{
* titleColor: string | string[];
* iconColor: string | string[];
* textColor: string | string[];
* bgColor: string | string[];
* borderColor: string | string[];
* ringColor: string | string[];
* }} Card colors.
* @returns {CardColors} Card colors.
*/
const getCardColors = ({
title_color,
Expand Down