Skip to content

Commit

Permalink
Add support for styled-components v6
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-rogerson committed Jul 25, 2023
1 parent 45ff6ad commit 206c024
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/lib/twinConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ const TWIN_CONFIG_DEFAULTS = {
} as const

// Defaults for different css-in-js libraries

const configDefaultsStyledComponents = {
sassyPseudo: true, // Sets selectors like hover to &:hover
} as const

const configDefaultsGoober = {
sassyPseudo: true, // Sets selectors like hover to &:hover
} as const
Expand All @@ -47,13 +52,15 @@ const configDefaultsStitches = {

function configDefaultsTwin({
isSolid,
isStyledComponents,
isGoober,
isStitches,
isDev,
}: GetPackageUsed & { isDev: boolean }): TwinConfigAll {
return {
...TWIN_CONFIG_DEFAULTS,
...(isSolid && configDefaultsSolid),
...(isStyledComponents && configDefaultsStyledComponents),
...(isGoober && configDefaultsGoober),
...(isStitches && configDefaultsStitches),
dataTwProp: isDev,
Expand Down

0 comments on commit 206c024

Please sign in to comment.