Browse Source

refactor(prejoin) use jss instead of sass in DialInDialog (#11122)

master
Shahab 3 years ago
parent
commit
f6a79860f2
No account linked to committer's email address

+ 0
- 49
css/premeeting/_prejoin-dialog.scss View File

@@ -116,52 +116,3 @@
116 116
         margin: 8px 0 16px 0;
117 117
     }
118 118
 }
119
-
120
-.prejoin-dialog-dialin {
121
-    text-align: center;
122
-
123
-    &-header {
124
-        align-items: center;
125
-        margin: 16px 0 32px 16px;
126
-        display: flex;
127
-    }
128
-
129
-    &-icon {
130
-        margin-right: 16px;
131
-    }
132
-
133
-    &-num {
134
-        background: #3e474f;
135
-        border-radius: 4px;
136
-        display: inline-block;
137
-        font-size: 15px;
138
-        line-height: 24px;
139
-        margin: 4px;
140
-        padding: 8px;
141
-
142
-        &-container {
143
-            min-height: 48px;
144
-            margin: 8px 0;
145
-        }
146
-    }
147
-
148
-    &-link {
149
-        color: #6FB1EA;
150
-        cursor: pointer;
151
-        display: inline-block;
152
-        font-size: 13px;
153
-        line-height: 20px;
154
-        margin-bottom: 24px;
155
-    }
156
-
157
-    &-spaced-label {
158
-        margin-bottom: 16px;
159
-        margin-top: 28px;
160
-    }
161
-
162
-    &-btns {
163
-        &> div {
164
-            margin-bottom: 16px;
165
-        }
166
-    }
167
-}

+ 50
- 1
react/features/prejoin/components/dialogs/DialInDialog.js View File

@@ -1,5 +1,6 @@
1 1
 // @flow
2 2
 
3
+import { makeStyles } from '@material-ui/styles';
3 4
 import React from 'react';
4 5
 
5 6
 import { translate } from '../../../base/i18n';
@@ -46,6 +47,53 @@ type Props = {
46 47
     t: Function,
47 48
 };
48 49
 
50
+const useStyles = makeStyles(theme => {
51
+    return {
52
+        dialInDialog: {
53
+            textAlign: 'center',
54
+
55
+            '& .prejoin-dialog-dialin-header': {
56
+                alignItems: 'center',
57
+                margin: `${theme.spacing(3)}px 0 ${theme.spacing(5)}px ${theme.spacing(3)}px`,
58
+                display: 'flex'
59
+            },
60
+            '& .prejoin-dialog-dialin-icon': {
61
+                marginRight: theme.spacing(3)
62
+            },
63
+            '& .prejoin-dialog-dialin-num': {
64
+                background: '#3e474f',
65
+                borderRadius: '4px',
66
+                display: 'inline-block',
67
+                fontSize: '15px',
68
+                lineHeight: '24px',
69
+                margin: theme.spacing(1),
70
+                padding: theme.spacing(2),
71
+
72
+                '& .prejoin-dialog-dialin-num-container': {
73
+                    minHeight: '48px',
74
+                    margin: `${theme.spacing(2)}px 0`
75
+                }
76
+            },
77
+
78
+            '& .prejoin-dialog-dialin-link': {
79
+                color: '#6FB1EA',
80
+                cursor: 'pointer',
81
+                display: 'inline-block',
82
+                fontSize: '13px',
83
+                lineHeight: '20px',
84
+                marginBottom: theme.spacing(4)
85
+            },
86
+            '& .prejoin-dialog-dialin-spaced-label': {
87
+                marginBottom: theme.spacing(3),
88
+                marginTop: '28px'
89
+            },
90
+            '& .prejoin-dialog-dialin-btns > div': {
91
+                marginBottom: theme.spacing(3)
92
+            }
93
+        }
94
+    };
95
+});
96
+
49 97
 /**
50 98
  * This component displays the dialog with all the information
51 99
  * to join a meeting by calling it.
@@ -63,12 +111,13 @@ function DialinDialog(props: Props) {
63 111
         passCode,
64 112
         t
65 113
     } = props;
114
+    const classes = useStyles();
66 115
     const flagClassName = `prejoin-dialog-flag iti-flag ${getCountryCodeFromPhone(
67 116
         number
68 117
     )}`;
69 118
 
70 119
     return (
71
-        <div className = 'prejoin-dialog-dialin'>
120
+        <div className = { classes.dialInDialog }>
72 121
             <div className = 'prejoin-dialog-dialin-header'>
73 122
                 <Icon
74 123
                     className = 'prejoin-dialog-icon prejoin-dialog-dialin-icon'

Loading…
Cancel
Save