diff --git a/lib/static/components/bullet.jsx b/lib/static/components/bullet.jsx index 196fe4777..1bb132911 100644 --- a/lib/static/components/bullet.jsx +++ b/lib/static/components/bullet.jsx @@ -1,24 +1,31 @@ import React from 'react'; import classNames from 'classnames'; -import {Checkbox} from 'semantic-ui-react'; import PropTypes from 'prop-types'; import {isCheckboxChecked, isCheckboxIndeterminate} from '../../common-utils'; import {CHECKED, INDETERMINATE, UNCHECKED} from '../../constants/checked-statuses'; import useLocalStorage from '../hooks/useLocalStorage'; +import {Checkbox} from '@gravity-ui/uikit'; +import {ChevronUp} from '@gravity-ui/icons'; const Bullet = ({status, onClick, className}) => { const [isCheckbox] = useLocalStorage('showCheckboxes', false); + const handleClick = React.useCallback((e) => { + e.stopPropagation(); + onClick(e); + }); + if (!isCheckbox) { - return ; + return ; } - return ; + return
+ +
}; Bullet.propTypes = { diff --git a/lib/static/components/controls/menu-bar.jsx b/lib/static/components/controls/menu-bar.jsx index fe634f2c3..1a95e3d2e 100644 --- a/lib/static/components/controls/menu-bar.jsx +++ b/lib/static/components/controls/menu-bar.jsx @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'; import {Dropdown} from 'semantic-ui-react'; import {isEmpty} from 'lodash'; import ExtensionPoint from '../extension-point'; -import plugins from '../../modules/plugins'; +import * as plugins from '../../modules/plugins'; import {MENU_BAR} from '../../../constants/extension-points'; import { Button, DropdownMenu, Icon, Menu } from '@gravity-ui/uikit'; import {Bars} from '@gravity-ui/icons'; diff --git a/lib/static/components/details.jsx b/lib/static/components/details.jsx index f909025bf..25046093a 100644 --- a/lib/static/components/details.jsx +++ b/lib/static/components/details.jsx @@ -8,6 +8,7 @@ import { Card, Disclosure } from '@gravity-ui/uikit'; export default class Details extends Component { static propTypes = { + type: PropTypes.oneOf(['text', 'image']), title: PropTypes.oneOfType([PropTypes.element, PropTypes.string]).isRequired, content: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.element, PropTypes.array]).isRequired, extendClassNames: PropTypes.oneOfType([PropTypes.array, PropTypes.string]), @@ -29,6 +30,10 @@ export default class Details extends Component { }); }; + stopPropagation = (e) => { + e.stopPropagation(); + } + _getContent() { const content = this.props.content; @@ -49,7 +54,7 @@ export default class Details extends Component { } render() { - const {title, content, extendClassNames} = this.props; + const {type, title, content, extendClassNames} = this.props; const className = classNames( 'details', extendClassNames @@ -65,12 +70,18 @@ export default class Details extends Component { size='l'> {(props, defaultButton) => ( -
{defaultButton}
{title}
+
+
+ {defaultButton} +
+ {title} +
)}
- + {type == 'image' ? this._renderContent() : + {this._renderContent()} - + } ) ); diff --git a/lib/static/components/extension-point.jsx b/lib/static/components/extension-point.jsx index 76323740e..8baf7ed7a 100644 --- a/lib/static/components/extension-point.jsx +++ b/lib/static/components/extension-point.jsx @@ -1,7 +1,7 @@ import React, {Component, Fragment} from 'react'; import PropTypes from 'prop-types'; import ErrorBoundary from './error-boundary'; -import plugins from '../modules/plugins'; +import * as plugins from '../modules/plugins'; export default class ExtensionPoint extends Component { static propTypes = { diff --git a/lib/static/components/icons/view-in-browser/index.jsx b/lib/static/components/icons/view-in-browser/index.jsx index bd6193d27..cd656b61d 100644 --- a/lib/static/components/icons/view-in-browser/index.jsx +++ b/lib/static/components/icons/view-in-browser/index.jsx @@ -3,6 +3,7 @@ import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import PropTypes from 'prop-types'; import classNames from 'classnames'; +import {Eye, EyeSlash} from '@gravity-ui/icons'; import * as actions from '../../../modules/actions'; import {getUrlWithBase} from '../../../../common-utils'; @@ -27,13 +28,13 @@ class ViewInBrowser extends Component { render() { const {suiteUrl, baseHost, extendClassNames} = this.props; const className = classNames( - 'fa view-in-browser', - suiteUrl ? 'fa-eye view-in-browser_active' : 'fa-eye-slash view-in-browser_disabled', + 'view-in-browser', + suiteUrl ? 'view-in-browser_active' : 'view-in-browser_disabled', extendClassNames ); if (!suiteUrl) { - return