1
0
Fork 0
mirror of synced 2024-10-02 01:56:57 +13:00

Type TypeIconMap

This commit is contained in:
Adria Navarro 2024-04-03 12:26:25 +02:00
parent f771cc17a7
commit 94890eae3e

View file

@ -1,3 +1,5 @@
import { FieldType, FieldTypeSubtypes } from "@budibase/types"
export const getColor = (idx, opacity = 0.3) => {
if (idx == null || idx === -1) {
idx = 0
@ -7,21 +9,21 @@ export const getColor = (idx, opacity = 0.3) => {
const TypeIconMap = {
text: "Text",
options: "Dropdown",
datetime: "Date",
barcodeqr: "Camera",
longform: "TextAlignLeft",
array: "Dropdown",
number: "123",
boolean: "Boolean",
attachment: "AppleFiles",
link: "DataCorrelated",
formula: "Calculator",
json: "Brackets",
bigint: "TagBold",
bb_reference: {
user: "User",
users: "UserGroup",
[FieldType.OPTIONS]: "Dropdown",
[FieldType.DATETIME]: "Date",
[FieldType.BARCODEQR]: "Camera",
[FieldType.LONGFORM]: "TextAlignLeft",
[FieldType.ARRAY]: "Dropdown",
[FieldType.NUMBER]: "123",
[FieldType.BOOLEAN]: "Boolean",
[FieldType.ATTACHMENT]: "AppleFiles",
[FieldType.LINK]: "DataCorrelated",
[FieldType.FORMULA]: "Calculator",
[FieldType.JSON]: "Brackets",
[FieldType.BIGINT]: "TagBold",
[FieldType.BB_REFERENCE]: {
[FieldTypeSubtypes.BB_REFERENCE.USER]: "User",
[FieldTypeSubtypes.BB_REFERENCE.USERS]: "UserGroup",
},
}