mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
cut out StorageList component
This commit is contained in:
23
browser/components/StorageList.js
Normal file
23
browser/components/StorageList.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @fileoverview Micro component for showing StorageList
|
||||
*/
|
||||
import React, { PropTypes } from 'react'
|
||||
import styles from './StorgaeList.styl'
|
||||
import CSSModules from 'browser/lib/CSSModules'
|
||||
|
||||
/**
|
||||
* @param {Array} storgaeList
|
||||
*/
|
||||
|
||||
const StorageList = ({storageList}) => (
|
||||
<div styleName='storageList'>
|
||||
{storageList.length > 0 ? storageList : (
|
||||
<div styleName='storgaeList-empty'>No storage mount.</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
StorageList.propTypes = {
|
||||
storgaeList: PropTypes.array.isRequired
|
||||
}
|
||||
export default CSSModules(StorageList, styles)
|
||||
Reference in New Issue
Block a user