diff --git a/src/components/BrowserCell/BrowserCell.react.js b/src/components/BrowserCell/BrowserCell.react.js index 3940555c38..f9e0b5dbce 100644 --- a/src/components/BrowserCell/BrowserCell.react.js +++ b/src/components/BrowserCell/BrowserCell.react.js @@ -45,7 +45,7 @@ let BrowserCell = ({ type, value, hidden, width, current, onSelect, onEditChange content = JSON.stringify(value); } else if (type === 'File') { if (value.url()) { - content = ; + content = ; } else { content = ; } diff --git a/src/components/FileEditor/FileEditor.react.js b/src/components/FileEditor/FileEditor.react.js index c90f12dbf8..794b79affd 100644 --- a/src/components/FileEditor/FileEditor.react.js +++ b/src/components/FileEditor/FileEditor.react.js @@ -52,13 +52,15 @@ export default class FileEditor extends React.Component { } render() { + const file = this.props.value; return (
- {this.props.value ? this.props.onCommit(undefined)}>Delete : null} + {file && file.url() ? Download : null} - {this.props.value ? 'Replace file' : 'Upload file'} + {file ? 'Replace file' : 'Upload file'} + {file ? this.props.onCommit(undefined)}>Delete : null}
); } diff --git a/src/components/FileEditor/FileEditor.scss b/src/components/FileEditor/FileEditor.scss index f5336d35fd..9f4245999d 100644 --- a/src/components/FileEditor/FileEditor.scss +++ b/src/components/FileEditor/FileEditor.scss @@ -14,7 +14,7 @@ padding: 6px; } -.delete, .upload { +.delete, .upload, .download { @include DosisFont; display: block; cursor: pointer; @@ -28,13 +28,13 @@ .delete { background: $red; - margin-bottom: 6px; } -.upload { +.upload, .download { position: relative; overflow: hidden; background: $blue; + margin-bottom: 6px; input { position: absolute;