Skip to content

Instantly share code, notes, and snippets.

@jide
Created March 20, 2016 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jide/4fa7d3fcd8be63a4962b to your computer and use it in GitHub Desktop.
Save jide/4fa7d3fcd8be63a4962b to your computer and use it in GitHub Desktop.
export default ({ Event, Region, Animate, Button, dispatch }) => ([
<Event start='00:00:00.000' end='00:00:10.000'>
<Region id='left' transition='cross-fade' duration={ 2 }>
<Button test={ dispatch('test') } type='important'>
Hello John !
</Button>
</Region>
<Region id='bottom' transition='cross-fade' duration={ 2 }>
<Button test={ dispatch('test') } type='important'>
Hello John !
</Button>
</Region>
</Event>,
<Event start='00:00:00.000' end='00:00:10.000' region='left' transition='cross-fade' duration={ 2 }>
duration => (
<Region id='left' transition='cross-fade' duration={ 2 }>
<Animate ease={ ease.quadOut } duration={ duration }>
<div opacity={ 0 }>
Hello John !
</div>
<div opacity={ 100 }>
Hello John !
</div>
</Animate>
</Region>
)
</Event>,
<Event start='00:00:00.000' end='00:00:10.000' region='left' transition='cross-fade' duration={ 2 }>
<Region id='left' transition='cross-fade' duration={ 2 }>
children => cloneElement(children, { className: 'active' })
</Region>
</Event>,
<Event start='00:00:00.000' end='00:00:10.000' region='left' transition='cross-fade' duration={ 2 } onEvent={ dispatch(someAction()) }/>,
<Event start='00:00:00.000' end='00:00:10.000' region='left' transition='cross-fade' duration={ 2 }>
<style dangerouslySetInnerHTML={{__html: `
div {
color: red;
}
`}}/>
</Event>
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment