From 94d6d8a58b38e1a796f19ebd3809c32d97e0dfbd Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Wed, 18 Jan 2023 16:41:45 +0100 Subject: [PATCH] use existing component in button --- packages/components/src/button/button.tsx | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/packages/components/src/button/button.tsx b/packages/components/src/button/button.tsx index 23d7f0d8..fa4f1c5a 100644 --- a/packages/components/src/button/button.tsx +++ b/packages/components/src/button/button.tsx @@ -1,16 +1,23 @@ -import { Stack, styled, Text } from '@tamagui/core' +import { Stack, styled } from '@tamagui/core' + +import { Paragraph } from '../typography' import type { GetProps } from '@tamagui/core' +// import { Pressable } from 'react-native' const Base = styled(Stack, { - // tag: 'button', + name: 'Button', + accessibilityRole: 'button', cursor: 'pointer', borderRadius: 12, display: 'inline-flex', paddingHorizontal: 16, - paddingVertical: 10, + paddingTop: 7, + paddingBottom: 9, animation: 'fast', + userSelect: 'none', + variants: { type: { primary: { @@ -27,12 +34,6 @@ const Base = styled(Stack, { } as const, }) -const ButtonText = styled(Text, { - fontFamily: '$inter', - textAlign: 'center', - color: '$white-100', -}) - type BaseProps = GetProps type Props = { @@ -46,9 +47,12 @@ const Button = (props: Props) => { return ( - {children} + + {children} + ) } export { Button } +export type { Props as ButtonProps }