add up/download button to ContentTooLarge view

This commit is contained in:
Maximilian Hils 2016-07-25 17:50:59 -07:00
parent 03a596d1d9
commit 3ebb58f641

View File

@ -1,5 +1,7 @@
import React from 'react' import React from 'react'
import { formatSize } from '../../utils.js' import { formatSize } from '../../utils.js'
import UploadContentButton from './UploadContentButton'
import DownloadContentButton from './DownloadContentButton'
export function ContentEmpty({ flow, message }) { export function ContentEmpty({ flow, message }) {
return ( return (
@ -17,11 +19,19 @@ export function ContentMissing({ flow, message }) {
) )
} }
export function ContentTooLarge({ message, onClick }) { export function ContentTooLarge({ message, onClick, uploadContent, flow }) {
return ( return (
<div className="alert alert-warning"> <div>
<button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button> <div className="alert alert-warning">
{formatSize(message.contentLength)} content size.
<button onClick={onClick} className="btn btn-xs btn-warning pull-right">Display anyway</button>
{formatSize(message.contentLength)} content size.
</div>
<div className="view-options text-center">
<UploadContentButton uploadContent={uploadContent}/>
&nbsp;
<DownloadContentButton flow={flow} message={message}/>
</div>
</div> </div>
) )
} }