b256a4396b
more improvements, fix url, do the same for cover remember url, error if invalid unneeded addition Fix delayed message Lint Allow empty values (placeholder and Gerbil) Fix filepath crash Fix button
31 lines
753 B
JavaScript
31 lines
753 B
JavaScript
// @flow
|
|
import React from 'react';
|
|
import { Modal } from 'modal/modal';
|
|
import SelectAsset from 'component/selectAsset';
|
|
|
|
type Props = {
|
|
closeModal: () => void,
|
|
currentValue: string,
|
|
title: string,
|
|
helpText: string,
|
|
onUpdate: (string, boolean) => void,
|
|
assetName: string,
|
|
};
|
|
|
|
function ModalImageUpload(props: Props) {
|
|
const { closeModal, currentValue, title, assetName, helpText, onUpdate } = props;
|
|
|
|
return (
|
|
<Modal isOpen type="card" onAborted={closeModal} contentLabel={title}>
|
|
<SelectAsset
|
|
onUpdate={(a, b) => onUpdate(a, b)}
|
|
currentValue={currentValue}
|
|
assetName={assetName}
|
|
recommended={helpText}
|
|
onDone={closeModal}
|
|
/>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
export default ModalImageUpload;
|