Skip to content

Sorting failed when using .attr() #16

Description

@captainamerican

If you add .attr() to a styled component, the plugin ignores the component.

To Reproduce
The following code will be ignored and the properties not sorted:

const aDiv = styled.div.attrs({ className: "SuperImportantDiv" })`
  color: red;
  border: 1px blue solid;
`;

Expected behavior
It should identify the styled component and sort the properties normally.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: OSX

Smartphone (please complete the following information):

  • Doesn't matter

Additional context
Great plugin otherwise!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions