Skip to content

Commit

Permalink
Fix/epmrpp 92701 buttons have broken styles (#3982)
Browse files Browse the repository at this point in the history
* EPMRPP-92701 || Create project and Invite user buttons have broken styles

* EPMRPP-92701 || import icons from the ui kit

* EPMRPP-92701 || update ui-kit

* EPMRPP-92701 || fix button property
  • Loading branch information
BlazarQSO committed Aug 23, 2024
1 parent 20704d0 commit 08ee1d1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 26 deletions.
8 changes: 4 additions & 4 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@formatjs/intl-pluralrules": "1.3.9",
"@formatjs/intl-relativetimeformat": "4.5.1",
"@formatjs/intl-utils": "1.6.0",
"@reportportal/ui-kit": "^0.0.1-alpha.22",
"@reportportal/ui-kit": "^0.0.1-alpha.23",
"axios": "1.6.4",
"c3": "0.7.20",
"chart.js": "2.9.4",
Expand Down
13 changes: 4 additions & 9 deletions app/src/pages/organization/emptyPageState/emptyPageState.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const EmptyPageState = ({
hasPermission,
label,
description,
startIcon,
icon,
buttonTitle,
emptyIcon,
onClick,
Expand All @@ -37,12 +37,7 @@ export const EmptyPageState = ({
<span className={cx('label')}>{label}</span>
<p className={cx('description')}>{description}</p>
{hasPermission && (
<Button
variant={'primary'}
className={cx('button')}
startIcon={startIcon}
onClick={onClick}
>
<Button variant={'primary'} className={cx('button')} icon={icon} onClick={onClick}>
{buttonTitle}
</Button>
)}
Expand All @@ -55,7 +50,7 @@ EmptyPageState.propTypes = {
label: PropTypes.string,
description: PropTypes.string,
buttonTitle: PropTypes.string,
startIcon: PropTypes.element,
icon: PropTypes.element,
onClick: PropTypes.func,
emptyIcon: PropTypes.element.isRequired,
};
Expand All @@ -65,6 +60,6 @@ EmptyPageState.defaultProps = {
label: '',
description: '',
buttonTitle: '',
startIcon: null,
icon: null,
onClick: () => {},
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ import { useSelector } from 'react-redux';
import { canCreateProject } from 'common/utils/permissions';
import classNames from 'classnames/bind';
import Parser from 'html-react-parser';
import { BubblesLoader } from '@reportportal/ui-kit';
import { BubblesLoader, PlusIcon } from '@reportportal/ui-kit';
import { useIntl } from 'react-intl';
import { loadingSelector, projectsSelector } from 'controllers/organizations/projects/selectors';
import { activeOrganizationLoadingSelector } from 'controllers/organizations/organization/selectors';
import { ScrollWrapper } from 'components/main/scrollWrapper';
import PlusIcon from 'common/img/plus-button-inline.svg';
import { userRolesSelector } from 'controllers/pages';
import { ProjectsPageHeader } from './projectsPageHeader';
import { EmptyPageState } from '../emptyPageState';
Expand Down Expand Up @@ -63,7 +62,7 @@ export const OrganizationProjectsPage = () => {
hasPermission={hasPermission}
label={label}
description={description}
startIcon={PlusIcon}
icon={<PlusIcon />}
buttonTitle={buttonTitle}
emptyIcon={EmptyIcon}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ import PropTypes from 'prop-types';
import { useIntl } from 'react-intl';
import { useSelector } from 'react-redux';
import Parser from 'html-react-parser';
import { Button } from '@reportportal/ui-kit';
import { Button, PlusIcon } from '@reportportal/ui-kit';
import classNames from 'classnames/bind';
import { PROJECTS_PAGE } from 'controllers/pages';
import searchIcon from 'common/img/newIcons/search-outline-inline.svg';
import filterIcon from 'common/img/newIcons/filters-outline-inline.svg';
import plusIcon from 'common/img/plus-button-inline.svg';
import { Breadcrumbs } from 'componentLibrary/breadcrumbs';
import { activeOrganizationSelector } from 'controllers/organizations/organization';
import userIcon from './img/user-inline.svg';
Expand Down Expand Up @@ -83,7 +82,7 @@ export const ProjectsPageHeader = ({ hasPermission }) => {
</div>
)}
{isNotEmpty && hasPermission && (
<Button variant={'text'} customClassName={cx('button')} startIcon={plusIcon}>
<Button variant={'ghost'} icon={<PlusIcon />}>
{formatMessage(messages.createProject)}
</Button>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@
}
}

.button {
border: $COLOR--topaz solid 1px;
height: 36px;
padding: 7px 16px;
}

.details {
display: flex;
height: 36px;
Expand Down

0 comments on commit 08ee1d1

Please sign in to comment.