nl_tokens: Returns a createElement () type based on the props of the Component . Useful for calculating what type a component should render as .
pl_tokens: function getElementType ( Component , props , getDefault ) { const { defaultProps = { } } = Component // ---------------------------------------- // user defined "as" element type if ( props . as && props . as !== defaultProps . as ) return props . as // ---------------------------------------- // computed default element type if ( getDefault ) { const computedDefault = getDefault ( ) if ( computedDefault ) return computedDefault } // ---------------------------------------- // infer anchor links if ( props . href ) return 'a' // ---------------------------------------- // use defaultProp or 'div' return defaultProps . <mask> || 'div' }