I created a repo here: https://github.com/JulSeb42/test-macro And I published a mini package to npm to show you: https://www.npmjs.com/package/test-macro Contributor agriffis commented Sep 20, 2022 It looks like you're trying to use both babel-plugin-styled-components and styled-co...
2 changes: 1 addition & 1 deletion 2 src/components/AddressInputPanel/index.tsx Original file line numberDiff line numberDiff line change @@ -1,6 +1,6 @@ import { t, Trans } from '@lingui/macro' import { useContext, useCallback, ReactNode } from 'react' import styled, { ThemeCont...
If your scaffold is set up with babel-plugin-macros, then simply use the new styled-components/macro import instead of styled-components:import styled, { createGlobalStyle } from 'styled-components/macro' const Thing = styled.div` color: red; ` const GlobalStyle = createGlobalStyle` body { ...
https://github.com/bradlc/babel-plugin-tailwind-components/releases/tag/v1.0.0-alpha.2 なので、以下のコマンドを実行します。 npminstall--save-devtailwind.macro@next または yarn add-Dtailwind.macro@next tailwind.macroはbabelのプラグインなので.babelrcに以下を追加 .babelrc {"plugins":["mac...
importtw,{css}from'twin.macro'consthoverStyles=css`&:hover {border-color: black;${tw`text-black`}}`constInput=({hasHover})=>() You can also use the tw import to create and style new components: importtwfrom'twin.macro'constInput=tw.input`border ...
Looks like the compiler duplicates the import statement of styled-components with the one created by the babel macro when mixing usage with tw.div``. This happens when using: twin.macro Nextjs styled-components Typescrip...