Repository URL to install this package:
|
Version:
2.7.3 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const words_1 = require("../../../words");
const styled_1 = require("./styled");
/**
* @todo @see README.md
*/
const Portal = props => props.children;
class SkipNav extends react_1.default.PureComponent {
render() {
const identifier = this.props.identifier;
const to = '#' + this.props.to; // tabIndex={}
return react_1.default.createElement(Portal, {
id: identifier
}, react_1.default.createElement(styled_1.SkipNavAnchorLink, {
href: to
}, words_1.wording.skipToMainContent));
}
}
SkipNav.defaultProps = {
to: 'main',
identifier: 'skipnav'
};
exports.SkipNav = SkipNav;
exports.default = SkipNav; //# sourceMappingURL=SkipNav.js.map