Skip to content

Commit

Permalink
docs(composables/attribute): improve jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
homj committed Nov 16, 2023
1 parent 7704a7a commit 79cbae1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions libs/composables/attribute/src/attribute.composable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export interface IBindAttributeOptions {
*
* ```ts
* const label = useAttribute('label', { namespace: 'xyz', initialValue: 'baz' });
* // or
* ```
* or
* ```ts
* const label = signal('baz');
* bindAttribute('label', mySignal, { namespace: 'xyz' });
* ```
Expand All @@ -31,13 +33,12 @@ export interface IBindAttributeOptions {
* @example Applying a default value
* ```ts
* const label = useAttribute('label', { defaultValue: 'baz' });
* // or
* ```
* or
* ```ts
* const label = signal<string | undefined>(undefined);
* bindAttribute('label', label, { defaultValue: 'baz' });
* ```
* ```html
* <my-component></my-component>
* ```
*
* will result in
*
Expand All @@ -48,13 +49,12 @@ export interface IBindAttributeOptions {
* @example Will not override if a value has been explicitly assigned in the DOM
* ```ts
* const label = useAttribute('label', { defaultValue: 'baz' });
* // or
* ```
* or
* ```ts
* const label = signal<string | undefined>(undefined);
* bindAttribute('label', mySignal, { defaultValue: 'baz' });
* ```
* ```html
* <my-component label="foo"></my-component>
* ```
*
* will result in
*
Expand Down

0 comments on commit 79cbae1

Please sign in to comment.