# Dialog Component
## Dialog port from Material UI, merged with Portal's dialog, with the added ability to animateFromOrigin of the trigger, and updated to ES6. 

*Props* 
* actions - can either be JSON, or an array of react elements. 
* contentClassname - class name to add to the dialog window container.
* openImmediately - on true, dialog is opened immediately (please note, animateFromOrigin will be automatically set to false, when this prop is true.)
* animateFromOrigin - will animate to and from the trigger, if set to false, will just be centered. 
* trigger - custom dialog trigger
    * type - can be one of three strings: (button, link, icon).
    * text - trigger label
    * state - buttons state (primary, secondary, success, error etc..)
    * triggerClass - additional custom class for the trigger
* title - the dialog title text.

*Events*
* onClickAway -  when user clicks away form the dialog
* onDismiss - when dialogs is dismissed
* onShow - when dialog is shown

*Methods*
* show() - displays dialog
* dismiss() - dismisses dialog


## JSX Example
```javascript
<Dialog 
    animateFromOrigin={true} 
    actions={actions} 
    ref="dialog" 
    trigger={ {type: 'link', text: 'Open Dialog'} } 
    title="This here be an excellent dialog.">
    <p>In the beginning, there was a DIALOG, and it was good.</p>
</Dialog>
```