Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: added types to SideNavFooter #14863

Merged
merged 7 commits into from
Oct 31, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import { usePrefix } from '../../internal/usePrefix';

export interface SideNavFooterProps {
assistiveText: string;
className?: string;
expanded: boolean;
onToggle: (event: React.MouseEvent<HTMLButtonElement>) => void;
Copy link
Collaborator

@tw15egan tw15egan Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add descriptions for each type? These can be copied from the PropType definitions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

}

/**
* SideNavFooter is used for rendering the button at the bottom of the side
* navigation that is a part of the UI Shell. It is responsible for handling the
Expand All @@ -22,7 +29,7 @@ function SideNavFooter({
className: customClassName,
expanded,
onToggle,
}) {
}: SideNavFooterProps) {
const prefix = usePrefix();
const className = cx(`${prefix}--side-nav__footer`, customClassName);
return (
Expand Down