Skip to content

Commit

Permalink
chore: 🎨 format:write with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
flixlix committed Apr 14, 2024
1 parent 7dcada6 commit 40d3771
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/components/spans/generalSecondarySpan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { PowerFlowCardPlus } from "../../power-flow-card-plus";
import { TemplatesObj } from "../../type";
import { PowerFlowCardPlusConfig } from "../../power-flow-card-plus-config";

export const generalSecondarySpan = (hass: HomeAssistant, main: PowerFlowCardPlus, config: PowerFlowCardPlusConfig, templatesObj: TemplatesObj, field, key: string) => {
export const generalSecondarySpan = (
hass: HomeAssistant,
main: PowerFlowCardPlus,
config: PowerFlowCardPlusConfig,
templatesObj: TemplatesObj,
field,
key: string
) => {
return html` ${field?.secondary?.has || field?.secondary?.template
? html` ${baseSecondarySpan({
main,
Expand Down
5 changes: 2 additions & 3 deletions src/style/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,8 @@ export const allDynamicStyles = (
const colors = ["#d0cc5b", "#964cb5", "#b54c9d", "#5bd0cc"];
const fieldNames: string[] = ["left-top", "left-bottom", "right-top", "right-bottom"];


if(!fieldNames?.[index]) {
console.log('\x1b[41m%s\x1b[0m', 'src/style/all.ts:230 field, index', field, index);
if (!fieldNames?.[index]) {
console.log("\x1b[41m%s\x1b[0m", "src/style/all.ts:230 field, index", field, index);
}
const fieldName = fieldNames?.[index] || "left-top";

Expand Down

0 comments on commit 40d3771

Please sign in to comment.