UNPKG

@ozen-ui/kit

Version:

React component library

22 lines (21 loc) 592 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getItemAriaLabel = void 0; var constants_1 = require("../../constants"); var getItemAriaLabel = function (_a) { var page = _a.page, type = _a.type, selected = _a.selected; if (type === constants_1.NEXT) { return 'Next'; } if (type === constants_1.PREVIOUS) { return 'Previous'; } if (selected) { return "Selected"; } if (type === constants_1.PAGE) { return "".concat(page); } return ''; }; exports.getItemAriaLabel = getItemAriaLabel;