Skip to content

Commit

Permalink
update stories
Browse files Browse the repository at this point in the history
  • Loading branch information
exced committed Dec 21, 2017
1 parent 389be97 commit a580c97
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions stories/src/Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ const initial = {
},
}

const images = {
file: 'https://github.com/exced/react-file-manager/blob/master/public/images/file.png',
folder: 'https://github.com/exced/react-file-manager/blob/master/public/images/folder.png',
}

const modals = {
editFolder: "Modifier dossier",
editFile: "Modifier fichier",
Expand Down Expand Up @@ -96,7 +101,7 @@ export default class Default extends Component {
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div style={{ flex: 1 }}>
<div style={{ float: 'left' }}>
<img src={item.children.length > 0 ? '/images/folder.png' : '/images/file.png'} alt={item.title} style={{ width: 22, height: 22 }} />
<img src={item.children.length > 0 ? images.folder : images.file} alt={item.title} style={{ width: 22, height: 22 }} />
</div>
</div>
<div style={{ flex: 5 }}>
Expand All @@ -113,7 +118,7 @@ export default class Default extends Component {

renderPreviewItem = (item) => (
<div style={{ textAlign: 'center', margin: 'auto', marginTop: 170, width: 200, height: 200, border: '1px solid', borderRadius: 6, borderColor: '#ccc' }}>
<img src={item.children.length > 0 ? '/images/folder.png' : '/images/file.png'} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<img src={item.children.length > 0 ? images.folder : images.file} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<span style={{ width: 150, textAlign: 'left', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{item.title}</span>
</div>
)
Expand All @@ -125,7 +130,7 @@ export default class Default extends Component {
if (item.children.length > 0) {
return (
<div style={{ textAlign: 'center', margin: 'auto', marginTop: 170, width: 200, height: 200, border: '1px solid', borderRadius: 6, borderColor: '#ccc' }}>
<img src={'/images/folder.png'} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<img src={images.folder} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<span style={{ width: 150, textAlign: 'left', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{item.title}</span>
<p style={{ marginTop: 10 }}>
<ButtonGroup>
Expand All @@ -141,7 +146,7 @@ export default class Default extends Component {
// file
return (
<div style={{ textAlign: 'center', margin: 'auto', marginTop: 170, width: 200, height: 200, border: '1px solid', borderRadius: 6, borderColor: '#ccc' }}>
<img src={'/images/file.png'} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<img src={images.file} alt={item.title} style={{ width: 70, height: 70, margin: 'auto', display: 'block', marginTop: 40 }} />
<span style={{ width: 150, textAlign: 'left', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}>{item.title}</span>
<p style={{ marginTop: 10 }}>
<ButtonGroup>
Expand Down

0 comments on commit a580c97

Please sign in to comment.