Skip to content

Commit

Permalink
chore(ui): tooltip to split panel
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Mar 7, 2019
1 parent 77dac9a commit 6dcb4c7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
17 changes: 14 additions & 3 deletions src/client/components/Settings/SplitSettingsPanel/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SplitSettingsPanel extends React.Component {
}

render () {
const { title, subtitle, rightComponent, menuItems } = this.props
const { title, subtitle, rightComponent, menuItems, tooltip } = this.props
return (
<div className='setting-item-wrap uk-margin-medium-bottom'>
<div
Expand All @@ -58,6 +58,16 @@ class SplitSettingsPanel extends React.Component {
<div className='left'>
<h6 style={{ padding: '0 0 0 15px', margin: '15px 0 0 0', fontSize: '16px', lineHeight: '14px' }}>
{title}
{tooltip && (
<i
className='material-icons'
style={{ color: '#888', fontSize: '16px', cursor: 'pointer', lineHeight: '3px', marginLeft: '4px' }}
data-uk-tooltip="{cls:'long-text'}"
title={tooltip}
>
error
</i>
)}
</h6>
<h5 style={{ padding: '0 0 10px 15px', margin: '2px 0 0 0', fontSize: '12px' }} className={'uk-text-muted'}>
{subtitle}
Expand All @@ -70,7 +80,7 @@ class SplitSettingsPanel extends React.Component {
<div className='panel-body2'>
<div className='uk-grid uk-grid-collapse'>
<div
className='split-panel-categories uk-width-1-4 scrollable br'
className='split-panel-categories uk-width-1-4 uk-width-large-1-5 scrollable br'
style={{ minHeight: '300px', overflow: 'hidden auto' }}
>
<Menu hideBorders={true} draggable={this.props.menuDraggable} onMenuDrag={this.props.menuOnDrag}>
Expand All @@ -91,7 +101,7 @@ class SplitSettingsPanel extends React.Component {
</Menu>
</div>
<div
className={'uk-width-3-4' + (this.props.scrollable ? ' scrollable' : '')}
className={'uk-width-3-4 uk-width-large-4-5' + (this.props.scrollable ? ' scrollable' : '')}
style={{ padding: '20px 15px 15px 15px', maxHeight: this.props.maxHeight || 'auto' }}
>
{menuItems.map(menuItem => {
Expand All @@ -116,6 +126,7 @@ class SplitSettingsPanel extends React.Component {
SplitSettingsPanel.propTypes = {
title: PropTypes.string.isRequired,
subtitle: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
tooltip: PropTypes.string,
rightComponent: PropTypes.element,
scrollable: PropTypes.bool,
maxHeight: PropTypes.string,
Expand Down
7 changes: 6 additions & 1 deletion src/client/containers/Settings/Permissions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ class PermissionsSettingsContainer extends React.Component {
<SplitSettingsPanel
title={'Permissions'}
tooltip={'Permission order is top down. ex: Admins at top; Users at bottom.'}
subtitle={'Create/Modify Role Permissions'}
subtitle={
<div>
Create/Modify Role Permissions{' '}
<span className={'uk-text-danger'}>Note: Changes take affect after page refresh</span>
</div>
}
rightComponent={
<Button
text={'Create'}
Expand Down
4 changes: 2 additions & 2 deletions src/client/containers/Settings/SettingsContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class SettingsContainer extends React.Component {
render () {
return (
<div className='uk-grid uk-grid-collapse'>
<div className='uk-width-1-6 message-list full-height' data-offset='68'>
<div className='uk-width-1-6 uk-width-xLarge-1-10 message-list full-height' data-offset='68'>
<div
className='page-title noshadow nopadding-right'
style={{ borderTop: 'none', borderBottom: 'none', height: '68px', paddingLeft: '20px' }}
Expand Down Expand Up @@ -135,7 +135,7 @@ class SettingsContainer extends React.Component {
</Menu>
</div>
</div>
<div className='uk-width-5-6'>
<div className='uk-width-5-6 uk-width-xLarge-9-10'>
<div
className='page-title-right noshadow page-title-border-bottom'
style={{ borderTop: 'none', height: '69px' }}
Expand Down

0 comments on commit 6dcb4c7

Please sign in to comment.