fundamental-react-native
v0.0.3
Published
A reusabale component library for React Native based on styles from SAP Fundamental Library.
Downloads
9
Maintainers
Readme
Fundamental React Native
Description
The fundamental-react-native
library is a set of React Native components based on SAP Fundamental Styles.
The SAP Fundamental Styles library is a design system and HTML/CSS component library used to build modern product user experiences with the SAP look and feel.
API Reference
See Component Documentation for examples and API details.
Requirements
You will need to install Node and Node Package Manager.
Getting Started
Install
For an existing react application, install fundamental-react-native
:
npm install fundamental-react-native
This project does not contain fonts - they must be added to your project separately. Download Font 72
Usage
React Native Fundamental uses a centralized theme to provide consistency across all the components.
Step 1. Import ThemeProvider and theme then wrap your root component.
This step is important. We are passing theme
as context value that each component will access.
//your root component
import { ThemeProvider, theme } from 'fundamental-react-native';
function App() {
return (
<ThemeProvider value={theme}>
<Root />
</ThemeProvider>
);
}
Step 2. Use component.
//inside any file
import { Button } from 'fundamental-react-native';
function HomeScreen() {
return (
<Button>
Press Me
</Button>
);
}
Contributing
Contributions, issues and feature requests are welcome!Feel free to check issues page.