File tree Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Expand file tree Collapse file tree 3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useEffect , useState } from 'react' ;
2
2
import { Link } from 'react-router-dom' ;
3
+ import {
4
+ DefaultButton ,
5
+ PrimaryButton ,
6
+ Stack ,
7
+ IStackTokens ,
8
+ } from 'office-ui-fabric-react' ;
3
9
import routes from '../constants/routes.json' ;
4
- import styles from './Home.css' ;
10
+
11
+ export interface IButtonExampleProps {
12
+ // These are set based on the toggles shown above the examples (not needed in real code)
13
+ disabled ?: boolean ;
14
+ checked ?: boolean ;
15
+ }
16
+
17
+ // Example formatting
18
+ const stackTokens : IStackTokens = { childrenGap : 40 } ;
5
19
6
20
export default function Home ( ) : JSX . Element {
7
21
const [ state ] = useState < string > ( 'Hi' ) ;
8
22
23
+ const alertClicked = ( ) : void => {
24
+ alert ( 'Clicked' ) ;
25
+ } ;
26
+
9
27
useEffect ( ( ) => {
10
28
// axios
11
29
// .get('http://localhost:5000')
@@ -14,8 +32,20 @@ export default function Home(): JSX.Element {
14
32
} , [ ] ) ;
15
33
16
34
return (
17
- < div className = { styles . container } data-tid = "container" >
35
+ < div >
18
36
< h2 > { state } </ h2 >
37
+ < Stack horizontal tokens = { stackTokens } >
38
+ < DefaultButton
39
+ text = "Standard"
40
+ onClick = { alertClicked }
41
+ allowDisabledFocus
42
+ />
43
+ < PrimaryButton
44
+ text = "Primary"
45
+ onClick = { alertClicked }
46
+ allowDisabledFocus
47
+ />
48
+ </ Stack >
19
49
< Link to = { routes . COUNTER } > counter</ Link >
20
50
</ div >
21
51
) ;
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import React, { Fragment } from 'react';
2
2
import { render } from 'react-dom' ;
3
3
import { AppContainer as ReactHotAppContainer } from 'react-hot-loader' ;
4
4
import { history , configuredStore } from './store' ;
5
- import './app.global.css' ;
6
5
7
6
const store = configuredStore ( ) ;
8
7
Original file line number Diff line number Diff line change 275
275
"webpack-merge" : " ^5.0.9"
276
276
},
277
277
"dependencies" : {
278
+ "@fluentui/react" : " ^7.150.0" ,
278
279
"@fortawesome/fontawesome-free" : " ^5.15.0" ,
279
280
"@hot-loader/react-dom" : " ^16.13.0" ,
280
281
"@reduxjs/toolkit" : " ^1.4.0" ,
You can’t perform that action at this time.
0 commit comments