Skip to content

Commit

Permalink
docs(asset): made headings consistent with other component docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikkimk committed Oct 18, 2024
1 parent caaebed commit e5bedb8
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions packages/asset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Asset } from '@spectrum-web-components/asset';

### Anatomy

An asset has a single default `slot`.
An asset has a single default `slot`. Use this slot for an image asset.

```html
<sp-asset style="height: 128px">
Expand All @@ -36,21 +36,14 @@ An asset has a single default `slot`.

### Options

#### File
#### Variant

```html
<div class="flex">
<sp-asset variant="file"></sp-asset>
<sp-asset variant="file" label="Named File Asset"></sp-asset>
</div>
```

#### Folder
Use `variant="file"`for a representation of a file or `variant="folder"` a representation of a folder.

```html
<div class="flex">
<sp-asset variant="file"></sp-asset>
<sp-asset variant="folder"></sp-asset>
<sp-asset variant="folder" label="Named Folder Asset"></sp-asset>
</div>
```

Expand All @@ -70,7 +63,7 @@ You can use the `label` property to provide a descriptive label. If a `label` is

```html
<div class="flex">
<sp-asset variant="folder"></sp-asset>
<sp-asset variant="file" label="Named File Asset"></sp-asset>
<sp-asset variant="folder" label="Named Folder Asset"></sp-asset>
</div>
```

0 comments on commit e5bedb8

Please sign in to comment.