Skip to content

Commit

Permalink
Fix: Correct variable name in color directive example code (#62912)
Browse files Browse the repository at this point in the history
- Change 'color' to 'colors' in destructured parameter of example code
- Update ensures the example code accurately demonstrates correct usage

Co-authored-by: byeongin <[email protected]>

Unlinked contributors: [email protected].
  • Loading branch information
airman5573 authored Jun 27, 2024
1 parent 3200f90 commit ea72cf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/interactivity/src/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const directivePriorities: Record< string, number > = {};
* ```js
* directive(
* 'color', // Name without prefix and suffix.
* ( { directives: { color }, ref, evaluate } ) =>
* ( { directives: { color: colors }, ref, evaluate } ) =>
* colors.forEach( ( color ) => {
* if ( color.suffix = 'text' ) {
* ref.style.setProperty(
Expand Down

0 comments on commit ea72cf1

Please sign in to comment.