Skip to content

Commit

Permalink
added documentation for components
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshdeep Singh authored and Arshdeep Singh committed Jan 5, 2024
1 parent 8f48854 commit 1a33a10
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Binary file added RNPComponents/Images/progressBar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added RNPComponents/Images/snackbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions RNPComponents/RNPComponents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# React Native Paper Component Templates

This Document contains a set of components Templates around various [React Native Paper](https://callstack.github.io/react-native-paper/index.html) components.

By default, the theming mechanism provided by RNP is very minimal and does not allow us to style components precisely the way we want for Brightlayer UI applications. To circumvent this issue, we create a template that you can use bring them in alignment with Brightlayer UI applications

These components templates simplify this process so that the end user do not create the component designs to bring them in alignment with Brightlayer UI applications.

## Component Template

- ### ProgressBar

In Progress Bar we have updated the Background of Progress bar to SurfaceContainerHighest to match the design

<img width='300' alt="ProgressBar" src="./images/progressBar.png"><br/>

Usage
```tsx
import { ProgressBar } from 'react-native-paper';

<ProgressBar
progress={0.5}
style={{ backgroundColor: theme.colors.surfaceContainerHighest }}
/>
```


- ### Snackbar

In SnackBar we have updated the Background of Snackbar to inverseSurface to match the design

<img width='300' alt="Snackbar" src="./images/snackbar.png"><br/>

````tsx
import { Snackbar } from 'react-native-paper';
<Snackbar
visible={true}
action={{
label: 'Dismiss',
onPress: (): void => {},
}}
style={{ backgroundColor: theme.colors.inverseSurface }}
>
Snackbar Text
</Snackbar>
````

0 comments on commit 1a33a10

Please sign in to comment.