|
@@ -22,9 +22,7 @@ import './InputModal.scss';
|
|
|
|
|
|
|
|
interface InputModalProps {
|
|
interface InputModalProps {
|
|
|
cancelText?: string;
|
|
cancelText?: string;
|
|
|
- description: string;
|
|
|
|
|
inputLabel: string;
|
|
inputLabel: string;
|
|
|
- inputPlaceholder?: string;
|
|
|
|
|
okText?: string;
|
|
okText?: string;
|
|
|
onClose: () => void;
|
|
onClose: () => void;
|
|
|
onCreate: (name: string) => void;
|
|
onCreate: (name: string) => void;
|
|
@@ -34,15 +32,12 @@ interface InputModalProps {
|
|
|
|
|
|
|
|
const defaultProps = {
|
|
const defaultProps = {
|
|
|
cancelText: 'Cancel',
|
|
cancelText: 'Cancel',
|
|
|
- inputPlaceholder: 'Enter text here',
|
|
|
|
|
okText: 'Submit'
|
|
okText: 'Submit'
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const InputModal: React.FC<InputModalProps> = ({
|
|
const InputModal: React.FC<InputModalProps> = ({
|
|
|
cancelText,
|
|
cancelText,
|
|
|
- description,
|
|
|
|
|
inputLabel,
|
|
inputLabel,
|
|
|
- inputPlaceholder,
|
|
|
|
|
okText,
|
|
okText,
|
|
|
onClose,
|
|
onClose,
|
|
|
onCreate,
|
|
onCreate,
|
|
@@ -69,7 +64,6 @@ const InputModal: React.FC<InputModalProps> = ({
|
|
|
open={showModal}
|
|
open={showModal}
|
|
|
title={t(title)}
|
|
title={t(title)}
|
|
|
>
|
|
>
|
|
|
- <div className="hue-input-modal__description">{t(description)}</div>
|
|
|
|
|
<div className="hue-input-modal__input-label">{t(inputLabel)}</div>
|
|
<div className="hue-input-modal__input-label">{t(inputLabel)}</div>
|
|
|
<Input
|
|
<Input
|
|
|
className="hue-input-modal__input"
|
|
className="hue-input-modal__input"
|
|
@@ -77,7 +71,6 @@ const InputModal: React.FC<InputModalProps> = ({
|
|
|
onInput={e => {
|
|
onInput={e => {
|
|
|
setTextInput((e.target as HTMLInputElement).value);
|
|
setTextInput((e.target as HTMLInputElement).value);
|
|
|
}}
|
|
}}
|
|
|
- placeholder={t(inputPlaceholder)}
|
|
|
|
|
/>
|
|
/>
|
|
|
</Modal>
|
|
</Modal>
|
|
|
);
|
|
);
|