UNPKG

@carbon/react

Version:

React components for the Carbon Design System

38 lines (36 loc) 1.1 kB
/** * Copyright IBM Corp. 2016, 2026 * * 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 { usePrefix } from "../../internal/usePrefix.js"; import classNames from "classnames"; import "react"; import PropTypes from "prop-types"; import { jsx } from "react/jsx-runtime"; //#region src/components/UIShell/SkipToContent.tsx /** * 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. */ function SkipToContent({ children = "Skip to main content", className: customClassName, href = "#main-content", tabIndex = 0, ...rest }) { const className = classNames(`${usePrefix()}--skip-to-content`, customClassName); return /* @__PURE__ */ jsx("a", { ...rest, className, href, tabIndex, children }); } SkipToContent.propTypes = { children: PropTypes.string, className: PropTypes.string, href: PropTypes.string, tabIndex: PropTypes.string }; //#endregion export { SkipToContent as default };