Skip to content

Commit

Permalink
fix(themes): Fix Neobrutalism theme in Core 2 (#3310)
Browse files Browse the repository at this point in the history
* fix(themes): Fix Neobrutalism theme in Core 2

* Create smooth-pugs-deny.md

* Update .changeset/smooth-pugs-deny.md

Co-authored-by: Nikos Douvlis <[email protected]>

* fix(themes): Fix neobrutalism theme in core 2

---------

Co-authored-by: Nikos Douvlis <[email protected]>
  • Loading branch information
EmmanouelaPothitou and nikosdouvlis authored May 2, 2024
1 parent 7ef62b2 commit 47a81d2
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-pugs-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/themes": patch
---

Update the `neobrutalism` to make it compatible with the new Core 2 components
68 changes: 62 additions & 6 deletions packages/themes/src/themes/neobrutalism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ const buttonStyle = {
},
};

const shadowStyle = {
boxShadow: '3px 3px 0px #000',
border: '2px solid #000',
};

export const neobrutalism = experimental_createTheme({
//@ts-expect-error not public api
simpleStyles: true,
variables: {
colorPrimary: '#DF1B1B',
colorShimmer: 'rgba(255,255,255,0.64)',
Expand All @@ -25,37 +32,86 @@ export const neobrutalism = experimental_createTheme({
},
},
elements: {
card: {
cardBox: {
boxShadow: '7px 7px 0px #000',
border: '3px solid #000',
},
card: {
borderRadius: '0',
},
headerSubtitle: { color: '#212126' },
alternativeMethodsBlockButton: buttonStyle,
socialButtonsIconButton: {
...buttonStyle,
},
socialButtonsBlockButton: buttonStyle,
selectButton: {
...buttonStyle,
...shadowStyle,
transition: 'all 0.2s ease-in-out',
'&:focus': {
boxShadow: '4px 4px 0px #000',
border: '2px solid #000',
transform: 'scale(1.01)',
},
},
socialButtonsBlockButton: { ...buttonStyle, color: '#212126' },
profileSectionPrimaryButton: buttonStyle,
profileSectionItem: { color: '#212126' },
avatarImageActionsUpload: buttonStyle,
menuButton: shadowStyle,
menuList: shadowStyle,
formButtonPrimary: buttonStyle,
navbarButton: buttonStyle,
formFieldAction: {
fontWeight: '700',
},
formFieldInput: {
boxShadow: '3px 3px 0px #000',
border: '2px solid #000',
...shadowStyle,
transition: 'all 0.2s ease-in-out',
'&:focus': {
boxShadow: '4px 4px 0px #000',
border: '2px solid #000',
transform: 'scale(1.01)',
},
'&:hover': {
...shadowStyle,
transform: 'scale(1.01)',
},
},
table: shadowStyle,
tableHead: {
color: '#212126',
},
dividerLine: {
background: '#000',
},
dividerText: {
fontWeight: '700',
color: '#212126',
},
footer: {
background: '#fff',
'& div': {
color: '#212126',
},
},
footerActionText: {
color: '#212126',
},
footerActionLink: {
fontWeight: '600',
borderBottom: '2px solid',
fontWeight: '700',
borderBottom: '3px solid',
'&:focus': {
boxShadow: 'none',
},
},
actionCard: {
...shadowStyle,
},
badge: {
border: '1px solid #000',
background: '#fff',
color: '#212126',
},
},
});

0 comments on commit 47a81d2

Please sign in to comment.