UNPKG

@carbon/react

Version:

React components for the Carbon Design System

33 lines (32 loc) 1.19 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 { ComponentProps } from 'react'; import PropTypes from 'prop-types'; export type SkipToContentProps = Omit<ComponentProps<'a'>, 'children'> & { children?: string | undefined; }; declare function SkipToContent({ children, className: customClassName, href, tabIndex, ...rest }: SkipToContentProps): import("react/jsx-runtime").JSX.Element; declare namespace SkipToContent { var propTypes: { /** * A ReactNode to display in the SkipToContent `a` tag. * `'Skip to main content'` by default. */ children: PropTypes.Requireable<string>; className: PropTypes.Requireable<string>; /** * Provide the `href` to the id of the element on your package that is the * main content. `#main-content` by default. */ href: PropTypes.Requireable<string>; /** * Optionally override the default tabindex of 0 */ tabIndex: PropTypes.Requireable<string>; }; } export default SkipToContent;