-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: composer action metadata (#431)
* feat: composer action metadata * chore: changesets * docs: up * nit: lint
- Loading branch information
Showing
9 changed files
with
212 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
"frog": minor | ||
--- | ||
|
||
**Breaking Change**. Composer Action Handlers now require a third argument to define metadata. | ||
|
||
```diff | ||
export const app = new Frog({ | ||
title: 'Composer Action', | ||
}).composerAction( | ||
'/', | ||
async (c) => { | ||
if (Math.random() > 0.5) return c.error({ message: 'Action failed :(' }) | ||
return c.res({ | ||
title: 'Some Composer Action', | ||
url: 'https://example.com', | ||
}) | ||
}, | ||
+ { | ||
+ name: 'Some Composer Action', | ||
+ description: 'Cool Composer Action', | ||
+ icon: 'image', | ||
+ imageUrl: 'https://frog.fm/logo-light.svg', | ||
+ }, | ||
) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.