mirror of
https://github.com/cssgunc/compass.git
synced 2025-04-06 20:50:17 -04:00
Added collection class
This commit is contained in:
parent
2f239c46c1
commit
260d67f9a5
16
compass/utils/classes/CollectionImpl.tsx
Normal file
16
compass/utils/classes/CollectionImpl.tsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
class CollectionImpl {
|
||||
title: string;
|
||||
icon: any;
|
||||
data: any;
|
||||
|
||||
constructor(title: string, icon: any) {
|
||||
this.title = title;
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
// subject to change
|
||||
setData(data: any){
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
|
@ -45,4 +45,10 @@ export enum DATATYPE {
|
|||
EMAIL,
|
||||
MULTISELECT,
|
||||
SELECT
|
||||
}
|
||||
|
||||
export const COLLECTION_MAP: {[key in COLLECTION]: CollectionImpl} = {
|
||||
[COLLECTION.RESOURCE]: new CollectionImpl('Resources', Icons.ResourceIcon),
|
||||
[COLLECTION.SERVICE]: new CollectionImpl('Services', Icons.ServiceIcon),
|
||||
[COLLECTION.USER]: new CollectionImpl('Users', Icons.UserIcon)
|
||||
}
|
Loading…
Reference in New Issue
Block a user