Skip to content

Commit 1786afa

Browse files
committed
docs: remove unused imports and add code highlighting
1 parent 75d7ff4 commit 1786afa

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

docs/guide/storage.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ You can access the Firebase Storage from within any component with the composabl
1212

1313
You can upload and monitor the progress of a file upload with the `useStorageFile()` composable. This also exposes the URL of the file once it's uploaded and its metadata, let's start with a full example of a form upload:
1414

15-
```vue
15+
```vue{4,?}
1616
<script setup lang="ts">
1717
// See https://vueuse.org/core/useFileDialog
1818
import { useFileDialog } from '@vueuse/core'
@@ -75,11 +75,10 @@ Once the picture is uploaded, you can use the `url` reactive variable. For examp
7575

7676
VueFire also exposes a smaller composable that only retrieves the url of a file. This is useful if you don't need to upload a file but only display it:
7777

78-
```vue
78+
```vue{4,?}
7979
<script setup lang="ts">
80-
import { useFileDialog } from '@vueuse/core'
8180
import { ref as storageRef } from 'firebase/storage'
82-
import { useFirebaseStorage, useStorageFile, useStorageFileUrl } from 'vuefire'
81+
import { useFirebaseStorage, useStorageFileUrl } from 'vuefire'
8382
8483
const storage = useFirebaseStorage()
8584
const mountainFileRef = storageRef(storage, 'images/mountains.jpg')
@@ -95,9 +94,8 @@ const {
9594

9695
The same way you can access the file URL you can also access the file metadata. You can also use the `update()` function to update the metadata and keep the reactive variable up to date:
9796

98-
```vue
97+
```vue{4,?}
9998
<script setup lang="ts">
100-
import { useFileDialog } from '@vueuse/core'
10199
import { ref as storageRef } from 'firebase/storage'
102100
import { useFirebaseStorage, useStorageFile } from 'vuefire'
103101

0 commit comments

Comments
 (0)