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