forked from tl-its-umich-edu/canvas-course-manager-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuthorizePrompt.tsx
56 lines (49 loc) · 1.46 KB
/
AuthorizePrompt.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React from 'react'
import { styled } from '@mui/material/styles'
import { Button, Typography } from '@mui/material'
import Help from './Help.js'
const PREFIX = 'AuthorizePrompt'
const classes = {
root: `${PREFIX}-root`,
button: `${PREFIX}-button`
}
const Root = styled('div')(() => ({
[`&.${classes.root}`]: {
padding: 25,
textAlign: 'left'
},
[`& .${classes.button}`]: {
marginTop: 15
}
}))
interface AuthorizePromptProps {
helpURL: string
}
export default function AuthorizePrompt (props: AuthorizePromptProps): JSX.Element {
return (
<Root className={classes.root}>
<Help baseHelpURL={props.helpURL} />
<Typography variant='h5' component='h1' gutterBottom>
Authorize Course Manager to Access Your Canvas Account
</Typography>
<Typography gutterBottom>
This is a third-party tool. You must authorize this tool before you can use it.
</Typography>
<Typography gutterBottom>
Use the <b>GO TO AUTHORIZE PAGE button</b> to start the authorization process.
</Typography>
<Typography gutterBottom>
<b>Note:</b> If you have done this before, it is likely that your integration was removed in Canvas.
</Typography>
<Button
className={classes.button}
color='primary'
variant='contained'
href='/canvas/redirectOAuth'
aria-label='Go to authorize page'
>
GO TO AUTHORIZE PAGE
</Button>
</Root>
)
}