From cb423cff2965ada571891637204e3230927e1054 Mon Sep 17 00:00:00 2001 From: David Bonan Date: Mon, 6 Jan 2020 12:09:12 +0100 Subject: [PATCH] Allow multiple selected text + Add font familly option Refactor change and update ElementOption composant for enable type select --- src/components/ElementOption.tsx | 27 +++++--- src/index.tsx | 110 ++++++++++++++++++++----------- 2 files changed, 91 insertions(+), 46 deletions(-) diff --git a/src/components/ElementOption.tsx b/src/components/ElementOption.tsx index 5a26c0ec3..e2fd995ec 100644 --- a/src/components/ElementOption.tsx +++ b/src/components/ElementOption.tsx @@ -2,6 +2,8 @@ import React from "react"; type PropsElementOption = { label: string; + type?: string; + options?: Array; value: string; onChange: Function; }; @@ -9,17 +11,24 @@ function ElementOption(props: PropsElementOption) { const handleChangeInput = (e: React.FormEvent) => { props.onChange(e.currentTarget.value); }; + const handleChangeSelect = (e: React.FormEvent) => { + props.onChange(e.currentTarget.value); + }; return ( <> -