diff --git a/src/components/DeviceCPULoad.tsx b/src/components/DeviceCPULoad.tsx index b7736398..aec54cd2 100644 --- a/src/components/DeviceCPULoad.tsx +++ b/src/components/DeviceCPULoad.tsx @@ -1,7 +1,7 @@ import StandartLineChart from './StandardLineChart' -import ShadowBox from './ShadowBox' import IconText from './IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' +import { Shadow } from '@status-im/components' type DataPoint = { x: number @@ -34,7 +34,7 @@ const DeviceCPULoad: React.FC = ({ load }) => { const message = currentLoad < 80 ? 'Good' : 'Poor' return ( - + = ({ load }) => { {/* This is additional text */} - + ) } diff --git a/src/components/DeviceStorageHealth.tsx b/src/components/DeviceStorageHealth.tsx index e65c28d0..bad50d2e 100644 --- a/src/components/DeviceStorageHealth.tsx +++ b/src/components/DeviceStorageHealth.tsx @@ -1,7 +1,7 @@ -import ShadowBox from './ShadowBox' import IconText from './IconText' import { Paragraph, Separator, XStack, YStack } from 'tamagui' import StandardGauge from './StandardGauge' +import { Shadow } from '@status-im/components' interface DeviceStorageHealthProps { storage: number maxStorage: number @@ -28,7 +28,7 @@ const DeviceStorageHealth: React.FC = ({ storage, maxS ] } return ( - + = ({ storage, maxS {/* This is additional text */} - + ) } diff --git a/src/components/FormattedText.tsx b/src/components/FormattedText.tsx index a0d02652..415aaf01 100644 --- a/src/components/FormattedText.tsx +++ b/src/components/FormattedText.tsx @@ -1,35 +1,27 @@ -import { Text } from 'tamagui' +import { Text } from '@status-im/components' export type TextElement = { text: string bold?: boolean italic?: boolean + weight?: 'regular' | 'medium' | 'semibold' } type FormattedTextProps = { textElements: TextElement[] color?: string - fontSize?: string + size: 27 | 19 | 15 | 13 | 11 } -const FormattedText = ({ textElements, color, fontSize }: FormattedTextProps) => { - const calculateStyle = (textElement: TextElement) => { - const isBold = textElement.bold ?? false - const isItalic = textElement.italic ?? false - - return { fontWeight: isBold ? 'bold' : '', fontStyle: isItalic ? 'italic' : '' } - } - +const FormattedText = ({ textElements, color, size }: FormattedTextProps) => { return ( - - {textElements.map((textElement, index) => { - return ( - - {textElement.text} - - ) - })} - + <> + {textElements.map((textElement, index) => ( + + {textElement.text} + + ))} + ) } diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index c65a6302..d4269152 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -1,14 +1,13 @@ -import { Image } from 'tamagui' +import { Image } from '@status-im/components' export type IconProps = { - source: string + src: string width?: number height?: number - className?: string } -const Icon = ({ source, width = 16, height = 16, ...props }: IconProps) => { - return +const Icon = ({ src, width = 16, height = 16 }: IconProps) => { + return } export default Icon diff --git a/src/components/IconButton.tsx b/src/components/IconButton.tsx deleted file mode 100644 index 84f14be5..00000000 --- a/src/components/IconButton.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import Icon from './Icon' -import ReactButton from './ReactButton' - -type IconButtonProps = { - children: string - icon: string - style?: unknown - size?: string - fontSize?: string - onClick?: () => void -} - -const IconButton = ({ icon, children, ...props }: IconButtonProps) => { - return ( - }> - {children} - - ) -} - -export default IconButton diff --git a/src/components/IconText.tsx b/src/components/IconText.tsx index 1fa15f68..5e43db2f 100644 --- a/src/components/IconText.tsx +++ b/src/components/IconText.tsx @@ -1,12 +1,13 @@ -import { Paragraph, XStack } from 'tamagui' +import { XStack } from 'tamagui' import Icon from './Icon' +import { Text } from '@status-im/components' type IconTextProps = { icon: string children: string } -const IconText = ({ icon, children, ...props }: IconTextProps) => { +const IconText = ({ icon, children }: IconTextProps) => { return ( { }} space={'$2'} > - - + + {children} - + ) } diff --git a/src/components/InformationBox.tsx b/src/components/InformationBox.tsx deleted file mode 100644 index 36016d53..00000000 --- a/src/components/InformationBox.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { XStack } from 'tamagui' - -import Icon from './Icon' -import FormattedText, { TextElement } from './FormattedText' - -type InformationBoxProps = { - icon: string - textElements: TextElement[] -} - -const InformationBox = ({ icon, textElements }: InformationBoxProps) => { - return ( - - - - - ) -} - -export default InformationBox diff --git a/src/components/NimbusLogo.tsx b/src/components/NimbusLogo.tsx index 7efa5558..5502f4b8 100644 --- a/src/components/NimbusLogo.tsx +++ b/src/components/NimbusLogo.tsx @@ -1,6 +1,7 @@ -import { Text, XStack } from 'tamagui' +import { XStack } from 'tamagui' import Icon from './Icon' import Tag from './Tag' +import { Text } from '@status-im/components' const NimbusLogo = () => { return ( @@ -11,8 +12,10 @@ const NimbusLogo = () => { }} space={'$2'} > - - Nimbus + + + Nimbus + ) diff --git a/src/components/NodesLogo.tsx b/src/components/NodesLogo.tsx index d5fd10e4..b92f217b 100644 --- a/src/components/NodesLogo.tsx +++ b/src/components/NodesLogo.tsx @@ -1,6 +1,7 @@ -import { Text, XStack } from 'tamagui' +import { XStack } from 'tamagui' import Icon from './Icon' import Tag from './Tag' +import { Text } from '@status-im/components' const NodesLogo = () => { return ( @@ -11,8 +12,10 @@ const NodesLogo = () => { }} space={'$2'} > - - nodes + + + nodes + ) diff --git a/src/components/ReactButton.tsx b/src/components/ReactButton.tsx deleted file mode 100644 index e1fd1fec..00000000 --- a/src/components/ReactButton.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { Button } from 'tamagui' -import { ReactNode } from 'react' - -type ReactButtonProps = { - children: string - style?: unknown - icon?: ReactNode - size?: string - onClick?: () => void -} - -const ReactButton = ({ children, ...props }: ReactButtonProps) => { - return -} - -export default ReactButton diff --git a/src/components/ShadowBox.tsx b/src/components/ShadowBox.tsx deleted file mode 100644 index ce14ff83..00000000 --- a/src/components/ShadowBox.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { ReactNode } from 'react' -import { Stack } from 'tamagui' - -type ShadowBoxProps = { - boxStyle?: React.CSSProperties - children: ReactNode -} - -const ShadowBox = ({boxStyle, children }: ShadowBoxProps) => { - return ( - - {children} - - ) -} - -export default ShadowBox diff --git a/src/components/SubTitle.tsx b/src/components/SubTitle.tsx index d6f54e5f..7eea219d 100644 --- a/src/components/SubTitle.tsx +++ b/src/components/SubTitle.tsx @@ -1,9 +1,16 @@ -import { Paragraph, styled } from 'tamagui' +import { Text } from '@status-im/components' -const SubTitle = styled(Paragraph, { - name: 'SubTitle', - accessibilityRole: 'header', - size: '$3', -}) +type SubTitleProps = { + color?: string + children: string +} + +const SubTitle = ({ color, children }: SubTitleProps) => { + return ( + + {children} + + ) +} export default SubTitle diff --git a/src/components/Title.tsx b/src/components/Title.tsx index 9b24ad3a..b5a02796 100644 --- a/src/components/Title.tsx +++ b/src/components/Title.tsx @@ -1,9 +1,16 @@ -import { Paragraph, styled } from 'tamagui' +import { Text } from '@status-im/components' -const Title = styled(Paragraph, { - name: 'Title', - accessibilityRole: 'header', - size: '$9', -}) +type TitleProps = { + color?: string + children: string +} + +const Title = ({ color, children }: TitleProps) => { + return ( + + {children} + + ) +} export default Title diff --git a/src/components/Titles.tsx b/src/components/Titles.tsx index 93f872c2..c630b978 100644 --- a/src/components/Titles.tsx +++ b/src/components/Titles.tsx @@ -1,7 +1,8 @@ import { XStack, YStack } from 'tamagui' import Title from './Title' import SubTitle from './SubTitle' -import IconButton from './IconButton' +import { Button } from '@status-im/components' +import Icon from './Icon' type TitlesProps = { title: string @@ -10,21 +11,12 @@ type TitlesProps = { const Titles = ({ title, subtitle }: TitlesProps) => { return ( - - + + {title} - + {subtitle}