-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reexport remaining components from PF (#1938)
* Bump component-groups package * Reexport TagCount component * Reexport SkeletonTable * Reexport Unavailable * Deprecate DateFormat * Reexport and deprecate InvalidObject * Deprecate a Truncate component * Remove unused files * Remove unused icon404 references
- Loading branch information
Showing
29 changed files
with
55 additions
and
1,306 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
11 changes: 0 additions & 11 deletions
11
packages/components/src/InvalidObject/InvalidObject.test.js
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,28 +1,14 @@ | ||
import React from 'react'; | ||
import Icon404 from './icon-404'; | ||
import { Button, Title } from '@patternfly/react-core'; | ||
import './invalidObject.scss'; | ||
import InvalidObjectPF, { InvalidObjectProps } from '@patternfly/react-component-groups/dist/dynamic/InvalidObject'; | ||
|
||
// Don't use chrome here because the 404 page on landing does not use chrome | ||
const isBeta = () => { | ||
return window.location.pathname.split('/')[1] === 'beta' ? '/beta' : ''; | ||
}; | ||
const isBeta = () => (window.location.pathname.split('/')[1] === 'beta' ? '/beta' : ''); | ||
|
||
const InvalidObject: React.FunctionComponent = ({ ...props }) => { | ||
return ( | ||
<section {...props} className="pf-v5-l-page__main-section pf-v5-c-page__main-section ins-c-component_invalid-component"> | ||
<Title headingLevel="h1" size="3xl"> | ||
We lost that page | ||
</Title> | ||
<Icon404 /> | ||
<Title headingLevel="h1" size="xl" className="ins-c-text__sorry"> | ||
Let's find you a new one. Try a new search or return home. | ||
</Title> | ||
<Button variant="link" component="a" href={`${window.location.origin}${isBeta()}`}> | ||
Return to homepage | ||
</Button> | ||
</section> | ||
); | ||
}; | ||
/** | ||
* @deprecated Do not use deprecated InvalidObject import, the component has been moved to @patternfly/react-component-groups | ||
*/ | ||
const InvalidObject: React.FunctionComponent<InvalidObjectProps> = (props) => ( | ||
<InvalidObjectPF toLandingPageUrl={`${window.location.origin}${isBeta()}`} {...props} /> | ||
); | ||
|
||
export default InvalidObject; |
Oops, something went wrong.