Skip to content

Commit

Permalink
refactor light_liveview and add tags to routeDetails
Browse files Browse the repository at this point in the history
floodfx committed Feb 1, 2022
1 parent a3ff8f2 commit 503283c
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/examples/light_liveview.ts
Original file line number Diff line number Diff line change
@@ -10,8 +10,7 @@ export type LightEvent = "on" | "off" | "up" | "down" | "key_update";

export class LightLiveViewComponent extends BaseLiveViewComponent<LightContext, never> implements
LiveViewComponent<LightContext, never>,
LiveViewExternalEventListener<LightContext, "on", { key: string }>,
LiveViewExternalEventListener<LightContext, "off", { key: string }> {
LiveViewExternalEventListener<LightContext, LightEvent, { key: string }> {


mount(params: LiveViewMountParams, session: Partial<SessionData>, socket: LiveViewSocket<LightContext>) {
2 changes: 1 addition & 1 deletion src/examples/routeDetails.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export const routeDetails: RouteDetails[] = [
label: "Light",
path: "/light",
summary: "Control the brightness of a porch light using buttons.",
tags: ["phx-click"]
tags: ["phx-click", "phx-window-keydown", "phx-key"]
},
{
label: "License",

0 comments on commit 503283c

Please sign in to comment.