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:
lucasgarfield 2022-03-02 18:43:45 +01:00 committed by jkozol
parent 1ec63ba357
commit 62559b8323

View 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;