[fix] next selected shapes comment (#2427)

setStyleForNextShapes had a comment describing how
setStyleForSelectedShapes worked. This PR fixes that.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fix error in setStyleForNextSelectedShapes comment
This commit is contained in:
Taha 2024-01-09 10:16:16 +00:00 committed by GitHub
parent 0d755de41e
commit 4821ba0ba3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -16888,7 +16888,7 @@
{
"kind": "Method",
"canonicalReference": "@tldraw/editor!Editor#setStyleForNextShapes:member(1)",
"docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp} for the selected shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red')\n * editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n",
"docComment": "/**\n * Set the value of a {@link @tldraw/tlschema#StyleProp} for the next shapes. This change will be applied to subsequently created shapes.\n *\n * @param style - The style to set.\n *\n * @param value - The value to set.\n *\n * @param historyOptions - The history options for the change.\n *\n * @example\n * ```ts\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red')\n * editor.setStyleForNextShapes(DefaultColorStyle, 'red', { ephemeral: true })\n * ```\n *\n * @public\n */\n",
"excerptTokens": [
{
"kind": "Content",

View file

@ -7390,12 +7390,12 @@ export class Editor extends EventEmitter<TLEventMap> {
}
/**
* Set the value of a {@link @tldraw/tlschema#StyleProp} for the selected shapes.
* Set the value of a {@link @tldraw/tlschema#StyleProp} for the next shapes. This change will be applied to subsequently created shapes.
*
* @example
* ```ts
* editor.setStyleForSelectedShapes(DefaultColorStyle, 'red')
* editor.setStyleForSelectedShapes(DefaultColorStyle, 'red', { ephemeral: true })
* editor.setStyleForNextShapes(DefaultColorStyle, 'red')
* editor.setStyleForNextShapes(DefaultColorStyle, 'red', { ephemeral: true })
* ```
*
* @param style - The style to set.