Skip to content

Commit

Permalink
feat: expose set() method of <Toggle>
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 31, 2018
1 parent 6b57488 commit 268b3af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "libreact",
"version": "1.0.0",
"version": "1.2.0",
"description": "React standard library",
"main": "lib/index.js",
"repository": {
Expand Down
3 changes: 2 additions & 1 deletion src/Toggle/index.ts
Expand Up @@ -12,7 +12,8 @@ export const Toggle: React.StatelessComponent<IToggleProps> = (props) =>
init: {on: props.init || false},
render: ({on}, set) => renderProp(props, {
on,
toggle: () => set({on: !on})
toggle: () => set({on: !on}),
set
})
});

Expand Down

0 comments on commit 268b3af

Please sign in to comment.