forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Alert, EmptyState, Popover): Upgraded to Core version 1.0.137 (
patternfly#1259) * refactor(Alert EmptyState Popover): Upgraded to Core version 1.0,137 and refactored breaking changes patternfly#1220 patternfly#1257 patternfly#1258 * fix build error
- Loading branch information
Showing
48 changed files
with
1,852 additions
and
5,446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ lerna-debug.log | |
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
.history/* | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
packages/patternfly-4/react-core/src/components/Alert/AlertAction.js
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { SFC, HTMLProps, ReactNode } from 'react'; | ||
import { OneOf, Omit } from '../../typeUtils'; | ||
|
||
export interface AlertActionCloseButtonProps extends HTMLProps<HTMLDivElement> { | ||
onClose?: Function; | ||
'aria-label'?: string; | ||
} | ||
|
||
declare const AlertActionCloseButton: SFC<AlertActionCloseButtonProps>; | ||
|
||
export default AlertActionCloseButton; |
34 changes: 34 additions & 0 deletions
34
packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { css } from '@patternfly/react-styles'; | ||
import PropTypes from 'prop-types'; | ||
import styles from '@patternfly/patternfly-next/components/Alert/alert.css'; | ||
import { Button, ButtonVariant } from '../Button'; | ||
import { TimesIcon } from '@patternfly/react-icons'; | ||
|
||
const propTypes = { | ||
/** additional classes added to the AlertActionCloseButton */ | ||
className: PropTypes.string, | ||
/** A callback for when the close button is clicked */ | ||
onClose: PropTypes.func, | ||
/** Aria Label for the Close button */ | ||
'aria-label': PropTypes.string, | ||
/** Additional props are spread to the container <Button> */ | ||
'': PropTypes.any | ||
}; | ||
|
||
const defaultProps = { | ||
className: '', | ||
onClose: () => undefined, | ||
'aria-label': 'Close' | ||
}; | ||
|
||
const AlertActionCloseButton = ({ className, onClose, 'aria-label': ariaLabel, ...props }) => ( | ||
<Button variant={ButtonVariant.plain} onClick={onClose} aria-label={ariaLabel} {...props}> | ||
<TimesIcon /> | ||
</Button> | ||
); | ||
|
||
AlertActionCloseButton.propTypes = propTypes; | ||
AlertActionCloseButton.defaultProps = defaultProps; | ||
|
||
export default AlertActionCloseButton; |
8 changes: 8 additions & 0 deletions
8
packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.d.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { SFC, HTMLProps, ReactNode } from 'react'; | ||
import { OneOf, Omit } from '../../typeUtils'; | ||
|
||
export interface AlertActionLinkProps extends HTMLProps<HTMLDivElement> {} | ||
|
||
declare const AlertActionLink: SFC<AlertActionLinkProps>; | ||
|
||
export default AlertActionLink; |
30 changes: 30 additions & 0 deletions
30
packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { css } from '@patternfly/react-styles'; | ||
import PropTypes from 'prop-types'; | ||
import styles from '@patternfly/patternfly-next/components/Alert/alert.css'; | ||
import { Button, ButtonVariant } from '../Button'; | ||
|
||
const propTypes = { | ||
/** content rendered inside the AlertLinkAction */ | ||
children: PropTypes.string, | ||
/** additional classes added to the AlertActionLink */ | ||
className: PropTypes.string, | ||
/** Additional props are spread to the container <Button> */ | ||
'': PropTypes.any | ||
}; | ||
|
||
const defaultProps = { | ||
children: '', | ||
className: '' | ||
}; | ||
|
||
const AlertActionLink = ({ className, children, ...props }) => ( | ||
<Button variant={ButtonVariant.link} {...props}> | ||
{children} | ||
</Button> | ||
); | ||
|
||
AlertActionLink.propTypes = propTypes; | ||
AlertActionLink.defaultProps = defaultProps; | ||
|
||
export default AlertActionLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.