Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Nalepa committed May 10, 2019
1 parent 704d0b4 commit bc0732e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Resources/public/scss/modules/udw/_main.scss
@@ -1,3 +1,5 @@
@import './tabs/main';

.ez-udw-module {
.c-popup__body {
padding: calculateRem(16px);
Expand Down
@@ -1,7 +1,7 @@
import React, { useState, useEffect, useCallback } from 'react';
import PropTypes from 'prop-types';
import Icon from '../../../common/icon/icon';
import { classnames } from '../../../common/classnames/classnames';
import { createCssClassNames } from '../../../common/css-class-names/css.class.names';

const SelectContentButtonComponent = ({ checkCanSelectContent, location, onSelect, onDeselect, isSelected }) => {
const [isSelectContentEnabled, setIsSelectContentEnabled] = useState(true);
Expand Down Expand Up @@ -39,7 +39,7 @@ const SelectContentButtonComponent = ({ checkCanSelectContent, location, onSelec
const iconId = isSelected ? 'checkmark' : 'create';
const attrs = {
type: 'button',
className: classnames({
className: createCssClassNames({
'c-select-content-button': true,
'c-select-content-button--selected': isSelected,
}),
Expand Down
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types';
import SelectedContentItemComponent from './selected.content.item.component';
import PopupComponent from '../../../common/tooltip-popup/tooltip.popup.component';
import { classnames } from '../../../common/classnames/classnames';
import { createCssClassNames } from '../../../common/css-class-names/css.class.names';

const noConfirmedContentTitle = Translator.trans(
/*@Desc("No confirmed content yet")*/ 'select_content.no_confirmed_content.title',
Expand Down Expand Up @@ -67,7 +67,7 @@ const SelectedContentComponent = ({ items, itemsLimit, onItemRemove }) => {
);
};
const titles = items.map((item) => item.ContentInfo.Content.Name).join(', ');
const btnClassNames = classnames({
const btnClassNames = createCssClassNames({
'c-selected-content__info': true,
'c-selected-content__info--any-item-selected': !!itemsCount,
});
Expand Down
4 changes: 2 additions & 2 deletions src/modules/udw/tabs/browse/browse.tab.module.js
Expand Up @@ -4,7 +4,7 @@ import TabContentPanelComponent from '../../common/tab-content-panel/tab.content
import FinderComponent from './components/finder/finder.component';
import ContentMetaPreviewComponent from '../../common/content-meta-preview/content.meta.preview.component';
import SelectedContentComponent from '../../common/selected-content/selected.content.component';
import { classnames } from '../../../common/classnames/classnames';
import { createCssClassNames } from '../../../common/css-class-names/css.class.names';
import BaseTabComponent from '../base.tab.component';

const UDWBrowseTab = ({ selectedItemsLimit, onCancel, onConfirm, ...props }) => {
Expand Down Expand Up @@ -35,7 +35,7 @@ const UDWBrowseTab = ({ selectedItemsLimit, onCancel, onConfirm, ...props }) =>
onItemRemove: unmarkContentAsSelected,
};
const tabAttrs = {
className: classnames({
className: createCssClassNames({
'ez-browse-tab': true,
'ez-browse-tab--with-preview': !!contentMeta,
}),
Expand Down
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useCallback } from 'react';
import PropTypes from 'prop-types';
import { ContentTypesContext } from '../../../../udw.module';
import FinderTreeLeafComponent from './finder.tree.leaf.component';
import { classnames } from '../../../../../common/classnames/classnames';
import { createCssClassNames } from '../../../../../common/css-class-names/css.class.names';

const TEXT_LOAD_MORE = Translator.trans(/*@Desc("Load more")*/ 'finder.branch.load_more.label', {}, 'universal_discovery_widget');

Expand Down Expand Up @@ -51,7 +51,7 @@ const FinderTreeBranchComponent = (props) => {
};

const wrapperAttrs = {
className: classnames({
className: createCssClassNames({
'c-finder-tree-branch': true,
'c-finder-tree-branch--collapsed': !items.length,
}),
Expand Down
Expand Up @@ -4,7 +4,7 @@ import SelectContentButtonComponent from '../../../../common/select-content-butt
import LoadingSpinnerComponent from '../../../../../common/loading-spinner/loading.spinner.component';
import Icon from '../../../../../common/icon/icon';
import { ContentTypesContext } from '../../../../udw.module';
import { classnames } from '../../../../../common/classnames/classnames';
import { createCssClassNames } from '../../../../../common/css-class-names/css.class.names';

const FinderTreeLeafComponent = (props) => {
const { location, isSelectable, onClick, isMarked, isLoadingChildren } = props;
Expand Down Expand Up @@ -35,7 +35,7 @@ const FinderTreeLeafComponent = (props) => {
}

const contentTypeIconUrl = window.eZ.helpers.contentType.getContentTypeIconUrl(contentTypeIdentifier);
const extraClasses = classnames({
const extraClasses = createCssClassNames({
'ez-icon--small': true,
'ez-icon--light': isMarked,
});
Expand Down Expand Up @@ -71,7 +71,7 @@ const FinderTreeLeafComponent = (props) => {

const isForcedLocation = allowedLocations.length === 1;
const wrapperAttrs = {
className: classnames({
className: createCssClassNames({
'c-finder-tree-leaf': true,
'c-finder-tree-leaf--selected': isMarked,
'c-finder-tree-leaf--not-selectable': !isSelectable || isForcedLocation,
Expand Down

0 comments on commit bc0732e

Please sign in to comment.