1+ import React from 'react' ;
2+ import { Modal } from 'office-ui-fabric-react/lib/Modal' ;
3+ import { Link } from 'office-ui-fabric-react/lib/Link' ;
4+ import { getTheme , IconButton } from 'office-ui-fabric-react' ;
5+ import { getContentStyles , getIconButtonStyles } from './styles/modal' ;
6+ import config from './services/config' ;
7+
8+ const TITLE_ID = 'ChangeLogTitle' ;
9+ const SUB_TITLE_ID = 'ChangeLogSubtitle' ;
10+
11+ interface ChangeLogModalProps {
12+ isOpen : boolean
13+ onClose : ( ) => void
14+ }
15+
16+ export default function ChangeLogModal ( props : ChangeLogModalProps ) {
17+ const theme = getTheme ( ) ;
18+ const contentStyles = getContentStyles ( theme ) ;
19+ const iconButtonStyles = getIconButtonStyles ( theme ) ;
20+
21+ return (
22+ < Modal
23+ titleAriaId = { TITLE_ID }
24+ subtitleAriaId = { SUB_TITLE_ID }
25+ isOpen = { props . isOpen }
26+ onDismiss = { props . onClose }
27+ containerClassName = { contentStyles . container }
28+ >
29+ < div className = { contentStyles . header } >
30+ < span id = { TITLE_ID } > Changelog</ span >
31+ < IconButton
32+ iconProps = { { iconName : 'Cancel' } }
33+ styles = { iconButtonStyles }
34+ ariaLabel = 'Close popup modal'
35+ onClick = { props . onClose as any }
36+ />
37+ </ div >
38+ < div id = { SUB_TITLE_ID } className = { contentStyles . body } >
39+ < p >
40+ < b > Interface - Global</ b >
41+ < ul >
42+ < li > Added list of snippets with < u > templates and tutorials</ u > near < b > Open</ b > menu item</ li >
43+ < li > Moved < b > Settings</ b > menu button from drop-down to main section</ li >
44+ </ ul >
45+ </ p >
46+ < p >
47+ < b > Interface - Settings</ b >
48+ < ul >
49+ < li > Added editor fonts selector</ li >
50+ < li > Added support of font code ligatures</ li >
51+ < li > Fixed fallback font issue that might cause issues on Linux</ li >
52+ </ ul >
53+ </ p >
54+ < p >
55+ And more!
56+ </ p >
57+ < p >
58+ Full release notes for { config . appVersion } are available < Link href = { `${ config . githubUrl } /releases/latest` } target = '_blank' > here</ Link >
59+ </ p >
60+ </ div >
61+ </ Modal >
62+ )
63+ }
64+
65+ ChangeLogModal . defaultProps = { isOpen : false } ;
0 commit comments