code format with pre-commit
This commit is contained in:
parent
1a7c3d9da2
commit
59c9c68e78
@ -137,7 +137,7 @@ The list view utilizes extra space to display an additional field (which is opti
|
||||
|
||||
`field`: Defined the key with the desired value for the additional information.
|
||||
|
||||
`color`: Define a color scheme to the additional information for customization and/or distinction.
|
||||
`color`: Define a color scheme to the additional information for customization and/or distinction.
|
||||
|
||||
Allowed options: `["theme", "adaptive", "black", "white"]`. Other values will be ignored.
|
||||
|
||||
|
||||
@ -117,14 +117,14 @@ function getColor(mapping, customData) {
|
||||
} catch (e) {
|
||||
return "";
|
||||
}
|
||||
case ("black"):
|
||||
case "black":
|
||||
return `text-black`;
|
||||
case ("white"):
|
||||
case "white":
|
||||
return `text-white`;
|
||||
case ("theme"):
|
||||
case "theme":
|
||||
return `text-theme-500`;
|
||||
default:
|
||||
return ""
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
@ -155,9 +155,7 @@ export default function Component({ service }) {
|
||||
>
|
||||
<div className="font-thin pl-2">{mapping.label}</div>
|
||||
<div className="flex flex-row text-right">
|
||||
<div className="font-bold mr-2">
|
||||
-
|
||||
</div>
|
||||
<div className="font-bold mr-2">-</div>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
@ -188,11 +186,9 @@ export default function Component({ service }) {
|
||||
>
|
||||
<div className="font-thin pl-2">{mapping.label}</div>
|
||||
<div className="flex flex-row text-right">
|
||||
<div className="font-bold mr-2">
|
||||
{formatValue(t, mapping, getValue(mapping.field, customData))}
|
||||
</div>
|
||||
<div className="font-bold mr-2">{formatValue(t, mapping, getValue(mapping.field, customData))}</div>
|
||||
{mapping.additionalField && (
|
||||
<div className={`font-bold mr-2 ${getColor(mapping, customData)}`} >
|
||||
<div className={`font-bold mr-2 ${getColor(mapping, customData)}`}>
|
||||
{formatValue(t, mapping.additionalField, getValue(mapping.additionalField.field, customData))}
|
||||
</div>
|
||||
)}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user