react-scanner
react-scanner copied to clipboard
Feature request: handle styled component
Is there anyway we can track the styled component to it's origin? See example below
import {Button} from 'design-system'
import {styled} from 'react-emotion'
...
const StyledButton = styled(Button)`
//some css here
`
const Container = () => {
return <StyledButton>
}
in this case, I would consider StyledButton IS Button from 'design-system' but in the generated report, I think we are only getting
{
"StyledButton": 1
}
is there any way we can detect this type of situation?
getComponentName: ({ imported, local, moduleName, importType }) => {
return `${moduleName}: ${imported || local}`;
},
is what I used in the config, I want to be able to tell where is this component from
I sort-of-ish tried to create a PR for this situation. Can definitely get some extra eyes/fingers on it tho. #56