Browse Source
* refactor: use rc-util/lib/pickAttrs * chore: upgrade rc-pagination * chore: upgrade rc-rate * type: fix ref type * test: update pagination snapshot * Update package.jsonpull/42723/head
afc163
2 years ago
committed by
GitHub
6 changed files with 18 additions and 75 deletions
@ -1,11 +0,0 @@ |
|||
export default function getDataOrAriaProps(props: any) { |
|||
return Object.keys(props).reduce((prev: any, key: string) => { |
|||
if ( |
|||
(key.startsWith('data-') || key.startsWith('aria-') || key === 'role') && |
|||
!key.startsWith('data-__') |
|||
) { |
|||
prev[key] = props[key]; |
|||
} |
|||
return prev; |
|||
}, {}); |
|||
} |
Loading…
Reference in new issue