Skip to content

Commit

Permalink
fix(clerk-js): Add descriptor on the button arrow (#2395)
Browse files Browse the repository at this point in the history
  • Loading branch information
anagstef authored Dec 18, 2023
1 parent b599a78 commit d261e3a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .changeset/tidy-buttons-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ export const APPEARANCE_KEYS = containsAllElementsConfigKeys([
'badge',
'notificationBadge',
'button',
'buttonArrowIcon',
'providerIcon',
'spinner',
// Decide if we want to keep the keys as camel cased in HTML as well,
Expand Down
1 change: 1 addition & 0 deletions packages/clerk-js/src/ui/elements/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const FormSubmit = (props: PropsOfComponent<typeof Button>) => {
<Button
elementDescriptor={descriptors.formButtonPrimary}
block
hasArrow
textVariant='buttonLarge'
isLoading={isLoading}
isDisabled={isDisabled}
Expand Down
4 changes: 3 additions & 1 deletion packages/clerk-js/src/ui/primitives/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ const ButtonChildrenWithArrow = ({ children }: PropsWithChildren) => {
return (
<Flex
align='center'
gap={2}
as='span'
>
{children}
<Icon
elementDescriptor={descriptors.buttonArrowIcon}
icon={ArrowRightButtonIcon}
sx={t => ({
marginLeft: t.space.$2,
width: t.sizes.$2x5,
height: t.sizes.$2x5,
opacity: t.opacity.$inactive,
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/appearance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ export type ElementsConfig = {
badge: WithOptions<'primary' | 'actionRequired'>;
notificationBadge: WithOptions;
button: WithOptions<never, LoadingState>;
buttonArrowIcon: WithOptions;
providerIcon: WithOptions<OAuthProvider | Web3Provider>;
spinner: WithOptions;
};
Expand Down

0 comments on commit d261e3a

Please sign in to comment.