UNPKG

@carbon/react

Version:

React components for the Carbon Design System

53 lines (52 loc) 2.01 kB
/** * Copyright IBM Corp. 2016, 2023 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react'; import PropTypes from 'prop-types'; export interface SideNavFooterProps { /** * Provide text to be read to screen readers and shown as a tooltip when * interacting with the toggle button in the footer */ assistiveText: string; className?: string; /** * Specify whether the side navigation is expanded or collapsed */ expanded: boolean; /** * Provide a function that is called when the toggle button is interacted * with. Useful for controlling the expansion state of the side navigation. */ onToggle: (event: React.MouseEvent<HTMLButtonElement>) => void; } /** * 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 * user interaction to expand or collapse the side navigation. */ declare function SideNavFooter({ assistiveText, className: customClassName, expanded, onToggle, }: SideNavFooterProps): import("react/jsx-runtime").JSX.Element; declare namespace SideNavFooter { var displayName: string; var propTypes: { /** * Provide text to be read to screen readers and shown as a tooltip when * interacting with the toggle button in the footer */ assistiveText: PropTypes.Requireable<string>; className: PropTypes.Requireable<string>; /** * Specify whether the side navigation is expanded or collapsed */ expanded: PropTypes.Validator<boolean>; /** * Provide a function that is called when the toggle button is interacted * with. Useful for controlling the expansion state of the side navigation. */ onToggle: PropTypes.Validator<(...args: any[]) => any>; }; } export default SideNavFooter;