No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Options 🛠

fieldComponent (React.Component)

const FieldCustom = ({data, onChange, onEditField}) => (
  <input 
    type="text" 
    value={data.value} 
    onChange={(e) => onChange(e.target.value)}
  />
);

const options = [
  { name: "phone", label: "Cell Phone" fieldComponent: FieldCustom }
];

fieldType

text | number | date | select

- select

const options = [
  { name: "color", label: "Color" fieldType: "select", options: [{label: "Red", value: "#e74c3c"}] }
];

Pill styles

const customPillStyles = { backgroundColor: "red", color: "white", border: "none" };

const options = [
  { name: "phone", label: "Cell Phone" fieldType: "text", styles: customPillStyles }
];