mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 00:23:59 -07:00
* New: UI Updates, Tag manager, More custom filters * fixup! Fix ScanFixture Unit Tests * Fixed: Sentry Errors from UI don't have release, branch, environment * Changed: Bump Mobile Detect for New Device Detection * Fixed: Build on changes to package.json * fixup! Add MetadataProfile filter option * fixup! Tag Note, Blacklist, Manual Import * fixup: Remove connectSection * fixup: root folder comment
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import formatBytes from 'Utilities/Number/formatBytes';
|
|
import EnhancedSelectInputSelectedValue from './EnhancedSelectInputSelectedValue';
|
|
import styles from './RootFolderSelectInputSelectedValue.css';
|
|
|
|
function RootFolderSelectInputSelectedValue(props) {
|
|
const {
|
|
value,
|
|
freeSpace,
|
|
includeFreeSpace,
|
|
...otherProps
|
|
} = props;
|
|
|
|
return (
|
|
<EnhancedSelectInputSelectedValue
|
|
className={styles.selectedValue}
|
|
{...otherProps}
|
|
>
|
|
<div className={styles.path}>
|
|
{value}
|
|
</div>
|
|
|
|
{
|
|
freeSpace != null && includeFreeSpace &&
|
|
<div className={styles.freeSpace}>
|
|
{formatBytes(freeSpace)} Free
|
|
</div>
|
|
}
|
|
</EnhancedSelectInputSelectedValue>
|
|
);
|
|
}
|
|
|
|
RootFolderSelectInputSelectedValue.propTypes = {
|
|
value: PropTypes.string,
|
|
freeSpace: PropTypes.number,
|
|
includeFreeSpace: PropTypes.bool.isRequired
|
|
};
|
|
|
|
RootFolderSelectInputSelectedValue.defaultProps = {
|
|
includeFreeSpace: true
|
|
};
|
|
|
|
export default RootFolderSelectInputSelectedValue;
|