Skip to content

Commit

Permalink
refactor(clerk-js): Avoid targeting element descriptors on actions hover
Browse files Browse the repository at this point in the history
  • Loading branch information
desiprisg committed Nov 29, 2023
1 parent 801a826 commit 83f0725
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 15 deletions.
120 changes: 120 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ export const SingleSessionActions = (props: SessionActionsProps) => {
borderBottomRightRadius: t.radii.$lg,
':hover': {
backgroundColor: t.colors.$danger50,
},
':hover .cl-userButtonPopoverActionButtonText__signOut': {
color: t.colors.$danger400,
},
':hover .cl-userButtonPopoverActionButtonIcon__signOut': {
color: t.colors.$danger400,
},
}),
Expand Down Expand Up @@ -113,11 +108,6 @@ export const MultiSessionActions = (props: SessionActionsProps) => {
t => ({
':hover': {
backgroundColor: t.colors.$danger50,
},
':hover .cl-userButtonPopoverActionButtonText__signOut': {
color: t.colors.$danger400,
},
':hover .cl-userButtonPopoverActionButtonIcon__signOut': {
color: t.colors.$danger400,
},
}),
Expand Down
6 changes: 2 additions & 4 deletions packages/clerk-js/src/ui.retheme/elements/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export const Action = (props: ActionProps) => {
icon={icon}
sx={[
theme => ({
color: theme.colors.$blackAlpha700,
width: theme.sizes.$4,
height: theme.sizes.$6,
}),
Expand All @@ -114,7 +113,7 @@ export const Action = (props: ActionProps) => {
elementId={textElementId}
as='span'
variant='smallMedium'
colorScheme='neutral'
colorScheme='inherit'
/>
{trailing}
</Button>
Expand Down Expand Up @@ -192,7 +191,6 @@ export const SmallAction = (props: ActionProps) => {
elementId={iconElementId}
icon={icon}
sx={theme => ({
color: theme.colors.$blackAlpha800,
width: theme.sizes.$4,
height: theme.sizes.$4,
marginRight: theme.space.$2,
Expand All @@ -206,7 +204,7 @@ export const SmallAction = (props: ActionProps) => {
elementId={textElementId}
as='span'
variant='extraSmallMedium'
colorScheme='neutral'
colorScheme='inherit'
/>
{trailing}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion packages/clerk-js/src/ui.retheme/primitives/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const { applyVariants, filterProps } = createVariants((theme, props: OwnProps) =
[vars.border]: theme.colors.$blackAlpha200,
[vars.accentLightest]: theme.colors.$blackAlpha50, // TODO: once we have the new color palette and style for pseudo classes
[vars.accentLighter]: theme.colors.$blackAlpha300, // TODO: once we have the new color palette and style for pseudo classes
[vars.accent]: theme.colors.$primary800, // WIP reference: Updated to new color palette; previously `$colorText`
[vars.accent]: theme.colors.$blackAlpha800, // WIP reference: Updated to new color palette; previously `$colorText`
[vars.accentDark]: theme.colors.$blackAlpha600, // TODO: once we have the new color palette and style for pseudo classes
[vars.accentDarker]: theme.colors.$blackAlpha700, // TODO: once we have the new color palette and style for pseudo classes
},
Expand Down

0 comments on commit 83f0725

Please sign in to comment.