Skip to content
Snippets Groups Projects
Unverified Commit 8b2f801b authored by Kyle Doherty's avatar Kyle Doherty
Browse files

initial default color

parent 5cd05886
No related branches found
No related tags found
No related merge requests found
......@@ -3,9 +3,15 @@ import React from "react";
import ColorPicker from "metabase/components/ColorPicker";
import cx from "classnames";
const FormColorWidget = ({ field, offset }) => (
const FormColorWidget = ({ field, offset, initial }) => (
<div className={cx({ "Form-offset": offset })}>
<ColorPicker {...field} />
<ColorPicker
{...field}
value={
// if the field has a value use that, otherwise use the initial
field.value || initial()
}
/>
</div>
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment