UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

14 lines (13 loc) 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = getDataOrAriaProps; function getDataOrAriaProps(props) { return Object.keys(props).reduce(function (prev, key) { if ((key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && !key.startsWith('data-__')) { prev[key] = props[key]; } return prev; }, {}); }