Signed-off-by: Ky <virginie.ky@gmail.com>
This commit is contained in:
Ky 2020-04-02 22:12:55 +02:00
parent c25694d465
commit 55c4962b77
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import styled from 'styled-components'; import styled from 'styled-components';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { themePropTypes } from 'strapi-helper-plugin';
import CardImgWrapper from '../CardImgWrapper'; import CardImgWrapper from '../CardImgWrapper';
@ -9,7 +10,7 @@ const FileWrapper = styled(CardImgWrapper)`
display: flex; display: flex;
position: relative; position: relative;
background-color: ${({ theme }) => theme.main.colors.black}; background-color: ${({ theme }) => theme.main.colors.black};
${({ hasError, theme }) => hasError && `border: 2px solid ${theme.main.colors.orange}`}; ${({ hasError, theme }) => hasError && `border: 2px solid ${theme.main.colors.orange};`}
.cropper-view-box { .cropper-view-box {
outline-color: ${({ theme }) => theme.main.colors.white}; outline-color: ${({ theme }) => theme.main.colors.white};
@ -34,6 +35,7 @@ FileWrapper.defaultProps = {
FileWrapper.propTypes = { FileWrapper.propTypes = {
hasError: PropTypes.bool, hasError: PropTypes.bool,
...themePropTypes,
}; };
export default FileWrapper; export default FileWrapper;

View File

@ -232,7 +232,7 @@ const reducer = (state, action) =>
break; break;
} }
case 'ON_SUBMIT_EDIT_EXISTING_FILE': { case 'ON_SUBMIT_EDIT_EXISTING_FILE': {
draftState.fileToEdit.isUploading = false; draftState.fileToEdit.isUploading = true;
break; break;
} }
case 'SET_FILE_TO_EDIT_ERROR': { case 'SET_FILE_TO_EDIT_ERROR': {