mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 20:20:06 -03:30
Merge branch 'master' into 177-UXImprovements
This commit is contained in:
49
src/components/CardCloseButton.jsx
Normal file
49
src/components/CardCloseButton.jsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import React from 'react';
|
||||
import { string } from 'prop-types';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Button } from '@patternfly/react-core';
|
||||
import { TimesIcon } from '@patternfly/react-icons';
|
||||
import { I18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
|
||||
function CardCloseButton ({ linkTo, ...props }) {
|
||||
if (linkTo) {
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Link
|
||||
className="pf-c-button pf-c-card__close"
|
||||
aria-label={i18n._(t`Close`)}
|
||||
title={i18n._(t`Close`)}
|
||||
to={linkTo}
|
||||
{...props}
|
||||
>
|
||||
<TimesIcon />
|
||||
</Link>
|
||||
)}
|
||||
</I18n>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<I18n>
|
||||
{({ i18n }) => (
|
||||
<Button
|
||||
variant="plain"
|
||||
className="pf-c-card__close"
|
||||
aria-label={i18n._(t`Close`)}
|
||||
{...props}
|
||||
>
|
||||
<TimesIcon />
|
||||
</Button>
|
||||
)}
|
||||
</I18n>
|
||||
);
|
||||
}
|
||||
CardCloseButton.propTypes = {
|
||||
linkTo: string,
|
||||
};
|
||||
CardCloseButton.defaultProps = {
|
||||
linkTo: null,
|
||||
};
|
||||
|
||||
export default CardCloseButton;
|
||||
@@ -1,21 +1,19 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import { I18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
|
||||
import {
|
||||
ActionGroup,
|
||||
Toolbar,
|
||||
ToolbarGroup,
|
||||
Button
|
||||
} from '@patternfly/react-core';
|
||||
import './styles.scss';
|
||||
|
||||
const formActionGroupStyle = {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'flex-end',
|
||||
marginTop: '10px'
|
||||
};
|
||||
|
||||
const buttonGroupStyle = {
|
||||
3
src/components/FormActionGroup/index.js
Normal file
3
src/components/FormActionGroup/index.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import FormActionGroup from './FormActionGroup';
|
||||
|
||||
export default FormActionGroup;
|
||||
3
src/components/FormActionGroup/styles.scss
Normal file
3
src/components/FormActionGroup/styles.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.pf-c-form__group.pf-m-action {
|
||||
--pf-c-form__group--m-action--MarginTop: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user