Skip to content

Commit

Permalink
feat(client): add content variant for button component
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed Feb 9, 2025
1 parent c97e161 commit 8f41676
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/client/app/auth/sign-in.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default function Page() {
<Button title="Sign In" onPress={onSignInPress} />

<Link href="/auth/sign-up" asChild>
<Button title="Sign Up" />
<Button variant="secondary" title="Sign Up" />
</Link>
</View>
</>
Expand Down
6 changes: 3 additions & 3 deletions apps/client/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const buttonVariants = cva('items-center justify-center rounded-md p-2', {
},
})

const iconVariants = cva('', {
const contentVariants = cva('', {
variants: {
variant: {
primary: 'color-primary-foreground',
Expand Down Expand Up @@ -82,13 +82,13 @@ const Button = React.forwardRef<
<Icon
size={16}
style={animatedStyle}
className={iconVariants({ variant })}
className={contentVariants({ variant })}
/>
) : (
<></>
)}
{title ? (
<Text className="text-primary-foreground" selectable={false}>
<Text className={contentVariants({ variant })} selectable={false}>
{title}
</Text>
) : (
Expand Down

0 comments on commit 8f41676

Please sign in to comment.