Add a StorageImage component (#182)

This commit is contained in:
Jeff
2019-11-11 14:24:42 -08:00
committed by GitHub
parent e8506dc921
commit ff1c1ea053
3 changed files with 44 additions and 20 deletions

View File

@@ -23,6 +23,8 @@
- [`SuspenseWithPerf`](#SuspenseWithPerf)
- Authentication
- [`AuthCheck`](#AuthCheck)
- Cloud Storage
- [`StorageImage`](#StorageImage)
- [ReactFireOptions](#ReactFireOptions)
## Providers
@@ -197,6 +199,19 @@ Renders `children` if a user is signed in and meets the required claims. Renders
| fallback | React.Component |
| requiredClaims | Object |
### `StorageImage`
Renders an image based on a Cloud Storage path.
#### Props
| Property | Type |
| ----------- | ------------------------ |
| storagePath | string |
| storage? | firebase.storage.Storage |
...and any other props a normal React `<img>` element can take.
### `SuspenseWithPerf`
Starts a Firebase Performance Monitoring [trace](https://firebase.google.com/docs/reference/js/firebase.performance.Trace) and ends it when suspense stops suspending.