We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0b18b5 commit da905a9Copy full SHA for da905a9
lib/utils/get-element-type.js
@@ -1,5 +1,12 @@
1
const {elementType, getProp, getPropValue} = require('jsx-ast-utils')
2
3
+/*
4
+Allows custom component to be mapped to an element type.
5
+When a default is set, all instances of the component will be mapped to the default.
6
+If a prop determines the type, it can be specified with `props`.
7
+
8
+For now, we only support the mapping of one prop type to an element type, rather than combinations of props.
9
+*/
10
function getElementType(context, node) {
11
const {settings} = context
12
const rawElement = elementType(node)
0 commit comments