vscode-styled-components icon indicating copy to clipboard operation
vscode-styled-components copied to clipboard

Doesn't detect this as a styled call

Open Jack-Works opened this issue 4 years ago • 2 comments

Describe the bug (including copyable syntax)

Not detected as styled css call

Screenshot image

To Reproduce

const Container = styled(ListItem)(
    ({ theme }) => `
    border: 1px solid #f3f3f4;
    border-radius: 6px;
    /* border-radius: ${theme.shape.borderRadius}; */
`,
)

Additional context

I'm not using styled-components but styled from @material-ui/core https://next.material-ui.com/styles/api/#styled-component-styles-options-component

Jack-Works avatar Jan 28 '21 08:01 Jack-Works

This fixes it

import styled, { css } from "styled-components";

const Container = styled(ListItem)(
    ({ theme }) => css`
    border: 1px solid #f3f3f4;
    border-radius: 6px;
    /* border-radius: ${theme.shape.borderRadius}; */
`,
)

adamerose avatar Aug 19 '21 20:08 adamerose