Skip to content

Commit

Permalink
use attr not prop
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Nov 18, 2022
1 parent daebd08 commit 599373c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions docs/resources/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ Thank you for your help and patience with testing Shoelace. I promise, we're not
- Improved a11y of the scroll buttons in `<sl-tab-group>`
- Improved a11y of the close button in `<sl-tab>`
- Improved a11y of `<sl-tab-panel>` by removing an invalid `aria-selected` attribute [#579](https://github.com/shoelace-style/shoelace/issues/579)
- Improved a11y of `<sl-icon>` by not using a variation of the `name` attribute for labels (use the `label` prop instead)
- Improved a11y of `<sl-icon>` by not using a variation of the `name` attribute for labels (use the `label` attribute instead)
- Moved `role` from the shadow root to the host element in `<sl-menu>`
- Removed redundant `role="menu"` in `<sl-dropdown>`
- Slightly faster animations for showing and hiding `<sl-dropdown>`
Expand Down Expand Up @@ -540,7 +540,7 @@ This release is the second attempt at unbundling dependencies. This will be a br
Shoelace doesn't have a lot of dependencies, but this release unbundles most of them so you can potentially save some extra kilobytes. This will be a breaking change only if your configuration _does not_ support bare module specifiers. CDN users and bundler users will be unaffected.

- 馃毃 BREAKING: renamed the `sl-clear` event to `sl-remove`, the `clear-button` part to `remove-button`, and the `clearable` property to `removable` in `<sl-tag>`
- Added the `disabled` prop to `<sl-resize-observer>`
- Added the `disabled` attribute to `<sl-resize-observer>`
- Fixed a bug in `<sl-mutation-observer>` where setting `disabled` initially didn't work
- Unbundled dependencies and configured external imports to be packaged with bare module specifiers

Expand Down
8 changes: 4 additions & 4 deletions scripts/plop/templates/component/component.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { CSSResultGroup } from 'lit';

/**
* @summary Short summary of the component's intended use.
*
*
* @since 2.0
* @status experimental
*
Expand All @@ -29,10 +29,10 @@ export default class {{ properCase tag }} extends ShoelaceElement {

private readonly localize = new LocalizeController(this);

/** An example property. */
@property() prop = 'example';
/** An example attribute. */
@property() attr = 'example';

@watch('someProp')
@watch('someProperty')
doSomething() {
// Example event
this.emit('sl-event-name');
Expand Down
4 changes: 2 additions & 2 deletions src/components/animation/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export default class SlAnimation extends ShoelaceElement {
@property() name = 'none';

/**
* Plays the animation. When omitted, the animation will be paused. This prop will be automatically removed when the
* animation finishes or gets canceled.
* Plays the animation. When omitted, the animation will be paused. This attribute will be automatically removed when
* the animation finishes or gets canceled.
*/
@property({ type: Boolean, reflect: true }) play = false;

Expand Down
2 changes: 1 addition & 1 deletion src/components/drawer/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class SlDrawer extends ShoelaceElement {

/**
* By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of
* its parent element, set this prop and add `position: relative` to the parent.
* its parent element, set this attribute and add `position: relative` to the parent.
*/
@property({ type: Boolean, reflect: true }) contained = false;

Expand Down

0 comments on commit 599373c

Please sign in to comment.