Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stacimc committed Jul 8, 2021
1 parent 05c701d commit d11fb07
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/reference-guides/block-api/block-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,21 @@ _Example_: Extract `src` and `alt` from each image element in the block's markup
// }
```

## Unique Attributes

The `unique` key is used to mark block attributes that should not be copied when a block is duplicated. By default all attribute values will be cloned to the duplicate block. If an attribute sets the `unique` key to `true`, its value will not be copied, and it will instead fall back to the default value if one is supplied.

_Example_: A `resourceId` attribute is marked as `unique` so that it will not be copied to duplicate blocks.

```js
{
resourceId: {
type: 'string',
unique: true
}
}
```

## Meta (deprecated)

<div class="callout callout-alert">
Expand Down

0 comments on commit d11fb07

Please sign in to comment.