Skip to content

Commit

Permalink
rename component
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRA committed Feb 6, 2023
1 parent 54c3d50 commit eae1a60
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ICON_WARNING_MODAL_LEVEL = {
success: 3,
}

class IconWarningModal extends BaseComponent {
class BulkIcons extends BaseComponent {
componentDidMount() {
// eslint-disable-next-line react/no-find-dom-node
findDOMNode(this)?.parentElement.classList.add('align-self-center')
Expand Down Expand Up @@ -45,15 +45,15 @@ class IconWarningModal extends BaseComponent {
return (
length !== 0 && (
// <a> in order to bypass the BlockLink component
<a className={`icon-warning-modal ${level}`} onClick={this.onClick}>
<a className={`bulk-icons-triangle ${level}`} onClick={this.onClick}>
<span>{length}</span>
</a>
)
)
}
}

IconWarningModal.propTypes = {
BulkIcons.propTypes = {
icons: PropTypes.arrayOf(
PropTypes.exact({
level: PropTypes.string.isRequired,
Expand All @@ -62,4 +62,4 @@ IconWarningModal.propTypes = {
),
}

export default IconWarningModal
export default BulkIcons
10 changes: 5 additions & 5 deletions packages/xo-web/src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ $select-input-height: 40px; // Bootstrap input height
}
}

.icon-warning-modal {
.bulk-icons-triangle {
border-color: transparent transparent transparent transparent;
border-style: inset;
border-width: 0 10px 20px 10px;
Expand All @@ -307,17 +307,17 @@ $select-input-height: 40px; // Bootstrap input height
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
}
.icon-warning-modal.danger {
.bulk-icons-triangle.danger {
border-bottom-color: #990822;
}
.icon-warning-modal.warning {
.bulk-icons-triangle.warning {
border-bottom-color: #eca649;
}
.icon-warning-modal.success {
.bulk-icons-triangle.success {
border-bottom-color: #089944;
}

.icon-warning-modal span {
.bulk-icons-triangle span {
color: white;
font-size: 0.75rem;
font-weight: bold;
Expand Down
4 changes: 2 additions & 2 deletions packages/xo-web/src/xo-app/home/host-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
import MiniStats from './mini-stats'
import styles from './index.css'

import IconWarningModal from '../../common/icon-warning-modal'
import BulkIcons from '../../common/bulk-icons'

@addSubscriptions({
hvSupportedVersions: subscribeHvSupportedVersions,
Expand Down Expand Up @@ -184,7 +184,7 @@ export default class HostItem extends Component {
<span className='tag tag-pill tag-info'>{_('pillMaster')}</span>
)}
&nbsp;
<IconWarningModal icons={icons} />
<BulkIcons icons={icons} />
</EllipsisContainer>
</Col>
<Col mediumSize={3} className='hidden-lg-down'>
Expand Down
4 changes: 2 additions & 2 deletions packages/xo-web/src/xo-app/home/pool-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { injectState } from 'reaclette'

import styles from './index.css'

import IconWarningModal from '../../common/icon-warning-modal'
import BulkIcons from '../../common/bulk-icons'
import { isAdmin } from '../../common/selectors'
import { ShortDate } from '../../common/utils'
import { getXoaPlan, SOURCES } from '../../common/xoa-plans'
Expand Down Expand Up @@ -132,7 +132,7 @@ export default class PoolItem extends Component {
<Text value={pool.name_label} onChange={this._setNameLabel} useLongClick />
</Ellipsis>
&nbsp;
<IconWarningModal icons={icons} />
<BulkIcons icons={icons} />
&nbsp;
{missingPatchCount > 0 && (
<span>
Expand Down

0 comments on commit eae1a60

Please sign in to comment.