Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Created October 14, 2020 20:57
Show Gist options
  • Save ljmotta/9c29f3bb0c660059a410cc7874b54dd7 to your computer and use it in GitHub Desktop.
Save ljmotta/9c29f3bb0c660059a410cc7874b54dd7 to your computer and use it in GitHub Desktop.
TodoListViewPage
export function TodoListViewPage() {
const todoListViewRef = useRef<TodoListApi>(null);
return (
<Page>
<div className={"webapp--page-main-div"}>
<ActionsSidebar todoListViewRef={todoListViewRef} />
<PageSection>
<EmbeddedTodoList
ref={todoListViewRef}
targetOrigin={window.location.origin}
envelopePath={"envelope/todo-list-view.html"}
todoList__itemRemoved={(item) => window.alert(`Item '${item}' removed successfully!`)}
/>
</PageSection>
</div>
</Page>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment