Skip to content

Commit

Permalink
updating @packrat/ui button and text to use styled from tamagui, stil…
Browse files Browse the repository at this point in the history
…l need to configure our tamagui theme properly
  • Loading branch information
andrew-bierman committed Dec 31, 2023
1 parent 825e838 commit e44b3dc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
16 changes: 5 additions & 11 deletions packages/ui/src/RButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { Button } from 'tamagui';
import useTheme from '~/hooks/useTheme';
import { Button, styled } from 'tamagui';

const RButton = ({children, backgroundColor, ...props}) => {
const { currentTheme } = useTheme();
const bg = backgroundColor ? backgroundColor : currentTheme.colors.secondaryBlue;
return (
<Button backgroundColor={bg} color={"white"} {...props}>
{children}
</Button>
);
};
const RButton = styled(Button, {
backgroundColor: '#0C66A1', // temp fix, we need to set up proper tamagui theme
color: 'white',
})

export default RButton;
26 changes: 17 additions & 9 deletions packages/ui/src/RText/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { Text } from 'tamagui';
// import { Text } from 'tamagui';

const PRText = ({ children, style, ...props }) => {
return (
<Text style={[style]} fontFamily="$body" {...props}>
{children}
</Text>
);
};
// const PRText = ({ children, style, ...props }) => {
// return (
// <Text style={[style]} fontFamily="$body" {...props}>
// {children}
// </Text>
// );
// };

export default PRText;
// export default PRText;

import { Paragraph, styled } from "tamagui";

const RText = styled(Paragraph, {
fontFamily: "$body",
});

export default RText;

0 comments on commit e44b3dc

Please sign in to comment.