Skip to content

Commit

Permalink
fix(APIKeyModal): review change
Browse files Browse the repository at this point in the history
  • Loading branch information
anamikaanu96 committed Nov 1, 2024
1 parent ba6ac98 commit 9206cac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const APIKeyDownloader = ({
fileName,
fileType,
linkText,
DownloadLinkLabel,
downloadLinkLabel,
}) => {
const [linkProps, setLinkProps] = useState({});

Expand Down Expand Up @@ -45,7 +45,7 @@ export const APIKeyDownloader = ({
<a
{...linkProps}
className={`${pkg.prefix}--apikey-modal__download-link`}
aria-label={DownloadLinkLabel ?? linkText}
aria-label={downloadLinkLabel ?? linkText}
role="button"
>
{linkText}
Expand All @@ -57,10 +57,6 @@ export const APIKeyDownloader = ({

APIKeyDownloader.displayName = componentName;
APIKeyDownloader.propTypes = {
/**
* aria-label for the download link
*/
DownloadLinkLabel: PropTypes.string,
/**
* the api key that's displayed to the user when a request to create is fulfilled.
*/
Expand All @@ -69,6 +65,10 @@ APIKeyDownloader.propTypes = {
* body content for the downloader
*/
body: PropTypes.string.isRequired,
/**
* aria-label for the download link
*/
downloadLinkLabel: PropTypes.string,
/**
* designates the name of downloadable json file with the key. if not specified will default to 'apikey'
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export let APIKeyModal: React.FC<APIKeyModalProps> = forwardRef(
fileName={downloadFileName}
linkText={downloadLinkText}
fileType={downloadFileType}
DownloadLinkLabel={downloadLinkLabel}
downloadLinkLabel={downloadLinkLabel}
/>
) : (
<div className={`${blockClass}__messaging-text`}>
Expand Down

0 comments on commit 9206cac

Please sign in to comment.