mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Changing Popup style to have a border that matches the theme.
This commit is contained in:
parent
e4f490b90a
commit
bf36568e13
3 changed files with 14 additions and 9 deletions
|
|
@ -730,16 +730,16 @@ export function HelpPopup({
|
|||
content,
|
||||
position = 'left center',
|
||||
iconSize = 'small',
|
||||
header = ''
|
||||
header = '',
|
||||
iconStyle = {marginLeft: '0.25em', marginRight: '0.25em', border: '1px solid grey'},
|
||||
}) {
|
||||
const trigger = <Icon circular link name={icon} size={iconSize} style={iconStyle}/>;
|
||||
return <Popup
|
||||
content={content}
|
||||
size={size}
|
||||
position={position}
|
||||
header={header || null}
|
||||
trigger={<Icon circular link name={icon} size={iconSize}
|
||||
style={{marginLeft: '0.25em', marginRight: '0.25em'}}
|
||||
/>}
|
||||
trigger={trigger}
|
||||
/>
|
||||
}
|
||||
|
||||
|
|
@ -752,8 +752,9 @@ export function HelpHeader({
|
|||
popupPosition = null,
|
||||
for_ = null,
|
||||
required = false,
|
||||
...props
|
||||
}) {
|
||||
return <div className='inline-header'>
|
||||
return <div className='inline-header' {...props}>
|
||||
<label htmlFor={for_}>
|
||||
<Header as={headerSize}>{headerContent} {required && <RequiredAsterisk/>}</Header>
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -269,8 +269,7 @@ export function Placeholder(props) {
|
|||
|
||||
export function Popup(props) {
|
||||
const {i} = useContext(ThemeContext);
|
||||
props = {...i, ...props};
|
||||
return <SPopup {...props}/>
|
||||
return <SPopup {...i} style={{border: '1px solid grey'}} {...props}/>
|
||||
}
|
||||
|
||||
export function Progress(props) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {Accordion, Header, Progress, Segment, Statistic, StatisticGroup, Table} from "../Theme";
|
||||
import React, {useContext} from "react";
|
||||
import {humanBandwidth, humanFileSize, LoadStatistic, useTitle} from "../Common";
|
||||
import {HelpHeader, humanBandwidth, humanFileSize, LoadStatistic, useTitle} from "../Common";
|
||||
import {ProgressPlaceholder} from "../Placeholder";
|
||||
import Grid from "semantic-ui-react/dist/commonjs/collections/Grid";
|
||||
import {Media, SettingsContext, StatusContext, ThemeContext} from "../../contexts/contexts";
|
||||
|
|
@ -281,7 +281,12 @@ export function StatusPage() {
|
|||
</Media>
|
||||
|
||||
<Segment>
|
||||
<SizedHeader>Drive Bandwidth</SizedHeader>
|
||||
<HelpHeader
|
||||
headerSize='h2'
|
||||
headerContent='Drive Bandwidth'
|
||||
popupContent='Inaccurate during startup. Becomes more accurate as the system is used.'
|
||||
style={{marginBottom: '1em'}}
|
||||
/>
|
||||
{!_.isEmpty(diskBandwidthStats) ?
|
||||
Object.entries(diskBandwidthStats).map(([name, disk]) => <DiskBandwidth key={name} {...disk}/>)
|
||||
: <ProgressPlaceholder/>}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue