CreateImageWizard: Add DocumentationButton form component
A documentation button, which contains an external link to the official documentation, appears several times throughout the frontend. Currently, the code for the documentation button is copy/pasted where needed. Adding a form component for the documentation button allows code reuse and improves readability in the code that calls it. Because this component is used by the LandingPage, ImagesTable, and ImageWizard it has been placed in a new directory, `src/Components/sharedComponents` which is at the same level as these directories.
This commit is contained in:
parent
1ec63ba357
commit
62559b8323
1 changed files with 21 additions and 0 deletions
21
src/Components/sharedComponents/DocumentationButton.js
Normal file
21
src/Components/sharedComponents/DocumentationButton.js
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { Button } from '@patternfly/react-core';
|
||||
import { ExternalLinkAltIcon } from '@patternfly/react-icons';
|
||||
|
||||
const DocumentationButton = () => {
|
||||
const documentationURL =
|
||||
'https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/uploading_a_customized_rhel_system_image_to_cloud_environments/index';
|
||||
|
||||
return (
|
||||
<Button
|
||||
component="a"
|
||||
target="_blank"
|
||||
variant="link"
|
||||
icon={ <ExternalLinkAltIcon /> }
|
||||
iconPosition="right"
|
||||
isInline
|
||||
href={ documentationURL }>Documentation</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default DocumentationButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue