瀏覽代碼

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

master
Shahab 3 年之前
父節點
當前提交
f6a79860f2
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 50 行新增50 行删除
  1. 0
    49
      css/premeeting/_prejoin-dialog.scss
  2. 50
    1
      react/features/prejoin/components/dialogs/DialInDialog.js

+ 0
- 49
css/premeeting/_prejoin-dialog.scss 查看文件

116
         margin: 8px 0 16px 0;
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 查看文件

1
 // @flow
1
 // @flow
2
 
2
 
3
+import { makeStyles } from '@material-ui/styles';
3
 import React from 'react';
4
 import React from 'react';
4
 
5
 
5
 import { translate } from '../../../base/i18n';
6
 import { translate } from '../../../base/i18n';
46
     t: Function,
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
  * This component displays the dialog with all the information
98
  * This component displays the dialog with all the information
51
  * to join a meeting by calling it.
99
  * to join a meeting by calling it.
63
         passCode,
111
         passCode,
64
         t
112
         t
65
     } = props;
113
     } = props;
114
+    const classes = useStyles();
66
     const flagClassName = `prejoin-dialog-flag iti-flag ${getCountryCodeFromPhone(
115
     const flagClassName = `prejoin-dialog-flag iti-flag ${getCountryCodeFromPhone(
67
         number
116
         number
68
     )}`;
117
     )}`;
69
 
118
 
70
     return (
119
     return (
71
-        <div className = 'prejoin-dialog-dialin'>
120
+        <div className = { classes.dialInDialog }>
72
             <div className = 'prejoin-dialog-dialin-header'>
121
             <div className = 'prejoin-dialog-dialin-header'>
73
                 <Icon
122
                 <Icon
74
                     className = 'prejoin-dialog-icon prejoin-dialog-dialin-icon'
123
                     className = 'prejoin-dialog-icon prejoin-dialog-dialin-icon'

Loading…
取消
儲存