diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx')
-rw-r--r-- | server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx index 5dd7604092d..f2f56ee80b3 100644 --- a/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx +++ b/server/sonar-web/src/main/js/apps/projectsManagement/Header.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import ChangeVisibilityForm from './ChangeVisibilityForm'; import { Organization, Visibility } from '../../app/types'; import { translate } from '../../helpers/l10n'; -import EditIcon from '../../components/icons-components/EditIcon'; +import { EditButton } from '../../components/ui/buttons'; export interface Props { hasProvisionPermission?: boolean; @@ -42,8 +42,7 @@ export default class Header extends React.PureComponent<Props, State> { this.props.onProjectCreate(); }; - handleChangeVisibilityClick = (event: React.SyntheticEvent<HTMLAnchorElement>) => { - event.preventDefault(); + handleChangeVisibilityClick = () => { this.setState({ visibilityForm: true }); }; @@ -60,14 +59,14 @@ export default class Header extends React.PureComponent<Props, State> { <div className="page-actions"> <span className="big-spacer-right"> - {translate('organization.default_visibility_of_new_projects')}{' '} - <strong>{translate('visibility', organization.projectVisibility)}</strong> - <a - className="js-change-visibility spacer-left link-no-underline" - href="#" - onClick={this.handleChangeVisibilityClick}> - <EditIcon className="text-text-top" /> - </a> + <span className="text-middle"> + {translate('organization.default_visibility_of_new_projects')}{' '} + <strong>{translate('visibility', organization.projectVisibility)}</strong> + </span> + <EditButton + className="js-change-visibility spacer-left button-small" + onClick={this.handleChangeVisibilityClick} + /> </span> {this.props.hasProvisionPermission && ( <button id="create-project" onClick={this.handleCreateProjectClick}> |