@gsretail.com/gui-core
Version:
A skeleton to create your own React component library using Rollup, TypeScript, Sass and Storybook
2 lines (1 loc) • 351 B
JavaScript
function e(e,t){return Array.isArray(t)?t.every((t=>-1!==e.indexOf(t))):-1!==e.indexOf(t)}const t=(e,t)=>n=>{"Enter"!==n.key&&" "!==n.key||(e(n),n.preventDefault(),n.stopPropagation()),t&&t(n)},n=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?n(t.shadowRoot):t:null};export{e as arrayIncludes,n as getActiveElement,t as onSpaceOrEnter};