-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updating @packrat/ui button and text to use styled from tamagui, stil…
…l need to configure our tamagui theme properly
- Loading branch information
1 parent
825e838
commit e44b3dc
Showing
2 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |