File tree 3 files changed +15
-4
lines changed
pages/UserSettingsPage/SSHKeysPage
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,8 @@ export const Example = Template.bind({})
17
17
Example . args = {
18
18
code : sampleCode ,
19
19
}
20
+
21
+ export const LongCode = Template . bind ( { } )
22
+ LongCode . args = {
23
+ code : "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICnKzATuWwmmt5+CKTPuRGN0R1PBemA+6/SStpLiyX+L" ,
24
+ }
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ const useStyles = makeStyles((theme) => ({
28
28
root : {
29
29
display : "flex" ,
30
30
flexDirection : "row" ,
31
- justifyContent : "space-between" ,
32
31
alignItems : "center" ,
33
32
background : theme . palette . background . default ,
34
33
color : theme . palette . primary . contrastText ,
@@ -39,6 +38,13 @@ const useStyles = makeStyles((theme) => ({
39
38
} ,
40
39
code : {
41
40
padding : `${ theme . spacing ( 0.5 ) } px ${ theme . spacing ( 0.75 ) } px ${ theme . spacing ( 0.5 ) } px ${ theme . spacing ( 2 ) } px` ,
41
+ whiteSpace : "nowrap" ,
42
+ width : "100%" ,
43
+ overflowX : "auto" ,
44
+ // Have a better area to display the scrollbar
45
+ height : 42 ,
46
+ display : "flex" ,
47
+ alignItems : "center" ,
42
48
} ,
43
49
button : {
44
50
border : 0 ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Button from "@material-ui/core/Button"
3
3
import CircularProgress from "@material-ui/core/CircularProgress"
4
4
import { useActor } from "@xstate/react"
5
5
import React , { useContext , useEffect } from "react"
6
- import { CodeBlock } from "../../../components/CodeBlock/CodeBlock "
6
+ import { CodeExample } from "../../../components/CodeExample/CodeExample "
7
7
import { ConfirmDialog } from "../../../components/ConfirmDialog/ConfirmDialog"
8
8
import { Section } from "../../../components/Section/Section"
9
9
import { Stack } from "../../../components/Stack/Stack"
@@ -41,10 +41,10 @@ export const SSHKeysPage: React.FC = () => {
41
41
42
42
{ sshKey && (
43
43
< Stack >
44
- < CodeBlock lines = { [ sshKey . public_key . trim ( ) ] } />
44
+ < CodeExample code = { sshKey . public_key . trim ( ) } />
45
45
< div >
46
46
< Button
47
- color = "primary "
47
+ variant = "outlined "
48
48
onClick = { ( ) => {
49
49
authSend ( { type : "REGENERATE_SSH_KEY" } )
50
50
} }
You can’t perform that action at this time.
0 commit comments