Got healthbars persisting data to the database

This commit is contained in:
Stefan Zermatten
2019-01-30 13:34:45 +02:00
parent f6b0c746cc
commit 80d369f0d4
8 changed files with 196 additions and 54 deletions

View File

@@ -1,12 +1,11 @@
import SimpleSchema from 'simpl-schema';
const ColorSchema = new SimpleSchema({
color: {
type: String,
defaultValue: "#9E9E9E",
// match hex colors of the form #A23 or #A23f56
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
},
const ColorSchema = ({optional = false} = {}) => ({
type: String,
defaultValue: "#9E9E9E",
// match hex colors of the form #A23 or #A23f56
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
optional
});
export default ColorSchema;