From 3969c274711b8c2f0721d73da637666f7a19b83f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Jul 2026 08:58:28 +0000 Subject: [PATCH] Revert accidental docs API regen --- docs/api/component.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/api/component.md b/docs/api/component.md index 7cab4de84..9b6e4086c 100644 --- a/docs/api/component.md +++ b/docs/api/component.md @@ -177,16 +177,16 @@ also before rendering the component ### Parameters -* `query` **([String][1] | [Function][4])** Component type or matcher function -* `opts` **[Object][2]** Search options (optional, default `{}`) - - * `opts.max` **[Number][9]?** Maximum number of matches before exiting +* `query` **([String][1] | Function)** Component type or matcher function +* `opts` **[Object][2]?** Search options +* `opts.max` **[Number][12]?** Maximum number of matches before exiting ### Examples ```javascript const allImages = component.findType('image'); console.log(allImages[0]) // prints the first found component + const someComponents = component.findType((cmp) => cmp.getType() === 'something', { max: 2 }); ``` @@ -199,7 +199,7 @@ If no component is found, it returns `undefined`. ### Parameters -* `query` **([String][1] | [Function][4])** Component type or matcher function +* `query` **([String][1] | Function)** Component type or matcher function ### Examples @@ -208,6 +208,7 @@ const image = component.findFirstType('image'); if (image) { console.log(image); } + const firstImage = component.findFirstType((cmp) => cmp.is('image')); ``` @@ -239,13 +240,14 @@ also before rendering the component ### Parameters -* `query` **([String][1] | [Function][4])** Component type or matcher function +* `query` **([String][1] | Function)** Component type or matcher function ### Examples ```javascript const Section = component.closestType('section'); console.log(Section); + const namedSection = component.closestType((cmp) => cmp.getName() === 'Section'); ```