Spinner for URL selector modal

Changelog-entry: Spinner for URL selector modal
Change-type: patch
This commit is contained in:
Alexis Svinartchouk 2020-08-24 19:46:46 +02:00
parent 27e560c961
commit fff9452509

View File

@ -30,6 +30,7 @@ import {
Txt,
Card as BaseCard,
Input,
Spinner,
} from 'rendition';
import styled from 'styled-components';
@ -137,8 +138,9 @@ const URLSelector = ({
<Modal
cancel={cancel}
primaryButtonProps={{
className: loading || !imageURL ? 'disabled' : '',
disabled: loading || !imageURL,
}}
action={loading ? <Spinner /> : 'OK'}
done={async () => {
setLoading(true);
const urlStrings = recentImages.map((url: URL) => url.href);