Skip to content

Commit

Permalink
docs: added adding shadow guide
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Apr 8, 2021
1 parent 0110a6b commit 5a28241
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 7 deletions.
30 changes: 30 additions & 0 deletions website/docs/guides/adding-shadow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: adding-shadow
title: Adding Shadow
description: Adding shadow to the Bottom Sheet.
keywords:
- bottomsheet
- bottom-sheet
- bottom sheet
- react-native
- react native
- ios
- android
- sheet
- modal
- presentation modal
- reanimated
image: /img/bottom-sheet-preview.gif
slug: /adding-shadow
---

![React Native Bottom Sheet Shadow](/img/bottom-sheet-shadow.jpg)

To add shadow to the bottom sheet, you will need to pass the `style` prop with shadow styling config, I recommend checking out [React Native Shadow Generator](https://ethercreative.github.io/react-native-shadow-generator/) by [@ethercreative](https://github.com/ethercreative).

:::note NOTICE

You may notice that shadow looks different between **iOS** and **Android**, that's because each platform handle drawing shadows differently, read more about [Android Shadows](https://developer.android.com/training/material/shadows-clipping).

:::

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can extend your custom backdrop props interface with the provided `BottomShe
### Example

import useBaseUrl from '@docusaurus/useBaseUrl';
import { Video } from '../components/video';
import { Video } from '../../components/video';

<Video
title="React Native Bottom Sheet Custom Backdrop"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can extend your custom background props interface with the provided `BottomS
### Example

import useBaseUrl from '@docusaurus/useBaseUrl';
import { Video } from '../components/video';
import { Video } from '../../components/video';

<Video
title="React Native Bottom Sheet Custom Background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can extend your custom handle props interface with the provided `BottomSheet
### Example

import useBaseUrl from '@docusaurus/useBaseUrl';
import { Video } from '../components/video';
import { Video } from '../../components/video';

<Video
title="React Native Bottom Sheet Custom Handle"
Expand Down
File renamed without changes.
9 changes: 5 additions & 4 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ module.exports = {
type: 'category',
label: 'Guides',
items: [
'custom-handle',
'custom-backdrop',
'custom-background',
'react-navigation-integration',
'guides/custom-handle',
'guides/custom-backdrop',
'guides/custom-background',
'guides/adding-shadow',
'guides/react-navigation-integration',
],
},
'troubleshooting',
Expand Down
Binary file added website/static/img/bottom-sheet-shadow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5a28241

Please sign in to comment.