Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added repro example * simplify and "fix" BubbleEvent * encapsulate mouse capture to avoid unintentional side effects * various cleanup * add effect hook to relase capture on unmount * reset selectedExample * fix comment typo and use line comments instead of block comments
- Loading branch information
Showing
8 changed files
with
159 additions
and
207 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
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,29 @@ | ||
open Revery; | ||
open Revery.UI; | ||
open Revery.UI.Components; | ||
|
||
module Styles = { | ||
open Style; | ||
|
||
let outer = [ | ||
position(`Absolute), | ||
top(0), | ||
bottom(0), | ||
left(0), | ||
right(0), | ||
justifyContent(`Center), | ||
alignItems(`Center), | ||
backgroundColor(Colors.yellow), | ||
]; | ||
}; | ||
|
||
let%component clickies = () => { | ||
let%hook (text, setText) = Hooks.state("Click something"); | ||
|
||
<Clickable | ||
style=Styles.outer onClick={() => setText(_ => "Clicked outside")}> | ||
<Button title=text onClick={() => setText(_ => "Clicked inside")} /> | ||
</Clickable>; | ||
}; | ||
|
||
let render = () => <clickies />; |
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.