I want to import a reusable Button component from theme folder.
This is the path of the Button component:
\app\theme\components\Button.ts
And this is the code of Button.ts
import { typography } from "theme/typography";import { ButtonProps } from "react-native-elements";export const Button = {titleStyle: { fontSize: typography.size, fontFamily: typography.primaryMedium, lineHeight: typography.size, letterSpacing: 0, marginHorizontal: typography.size},containerStyle: { borderRadius: typography.size * 2 + typography.size * 2},buttonStyle: { borderRadius: typography.size * 2 + typography.size}} as ButtonProps
And this is the component in which I want to import: organizationdetails-screen.tsx
.
It's path is \app\screens\superadmin-screens\organizationdetails-screen.tsx
.
I am trying to import the Button like this
import { Button } from '../../theme/components/Button';
But I am getting this error
I am using the Button like this:
<Button title="Add User" onPress={() => this.props.navigation.navigate('AddNewUser')}/>
When I hover over the button in Visual Studio Code it shows this error:
How do I import this reusable Button?