|
1 | 1 | import React, {useEffect} from 'react';
|
2 | 2 | import {StationLoginPresentationalProps} from './station-login.types';
|
3 | 3 |
|
| 4 | +import './station-login.style.scss'; |
| 5 | + |
4 | 6 | const StationLoginPresentational: React.FunctionComponent<StationLoginPresentationalProps> = (props) => {
|
5 | 7 | const {name, teams, loginOptions, login, logout, setDeviceType, setDialNumber, setTeam} = props; // TODO: Use the loginSuccess, loginFailure, logoutSuccess props returned fromthe API response via helper file to reflect UI changes
|
6 | 8 |
|
@@ -48,84 +50,26 @@ const StationLoginPresentational: React.FunctionComponent<StationLoginPresentati
|
48 | 50 | setDialNumber(dialNumber.value);
|
49 | 51 | }
|
50 | 52 |
|
51 |
| - const styles = { |
52 |
| - box: { |
53 |
| - backgroundColor: '#ffffff', |
54 |
| - borderRadius: '8px', |
55 |
| - boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)', |
56 |
| - padding: '20px', |
57 |
| - maxWidth: '800px', |
58 |
| - margin: '0 auto' |
59 |
| - }, |
60 |
| - |
61 |
| - sectionBox: { |
62 |
| - padding: '10px', |
63 |
| - border: '1px solid #ddd', |
64 |
| - borderRadius: '8px' |
65 |
| - }, |
66 |
| - |
67 |
| - fieldset: { |
68 |
| - border: '1px solid #ccc', |
69 |
| - borderRadius: '5px', |
70 |
| - padding: '10px', |
71 |
| - marginBottom: '20px' |
72 |
| - }, |
73 |
| - |
74 |
| - legendBox: { |
75 |
| - fontWeight: 'bold', |
76 |
| - color: '#0052bf' |
77 |
| - }, |
78 |
| - |
79 |
| - btn: { |
80 |
| - padding: '10px 20px', |
81 |
| - backgroundColor: '#0052bf', |
82 |
| - color: 'white', |
83 |
| - border: 'none', |
84 |
| - borderRadius: '4px', |
85 |
| - cursor: 'pointer', |
86 |
| - transition: 'background-color 0.3s', |
87 |
| - marginRight: '8px' |
88 |
| - }, |
89 |
| - |
90 |
| - select: { |
91 |
| - width: '100%', |
92 |
| - padding: '8px', |
93 |
| - marginTop: '8px', |
94 |
| - marginBottom: '12px', |
95 |
| - border: '1px solid #ccc', |
96 |
| - borderRadius: '4px' |
97 |
| - }, |
98 |
| - |
99 |
| - input: { |
100 |
| - width: '97%', |
101 |
| - padding: '8px', |
102 |
| - marginTop: '8px', |
103 |
| - marginBottom: '12px', |
104 |
| - border: '1px solid #ccc', |
105 |
| - borderRadius: '4px' |
106 |
| - } |
107 |
| - } |
108 |
| - |
109 | 53 | return (
|
110 | 54 | <><h1 data-testid="station-login-heading">{name}</h1>
|
111 |
| - <div style={styles.box}> |
112 |
| - <section style={styles.sectionBox}> |
113 |
| - <fieldset style={styles.fieldset}> |
114 |
| - <legend style={styles.legendBox}>Agent</legend> |
| 55 | + <div className='box'> |
| 56 | + <section className="section-box"> |
| 57 | + <fieldset className='fieldset'> |
| 58 | + <legend className='legend-box'>Agent</legend> |
115 | 59 | <div style={{ display: 'flex', flexDirection: 'column', flexGrow: 1 }}>
|
116 | 60 | <div style={{ display: 'flex', gap: '1rem' }}>
|
117 | 61 | <fieldset style={{border: '1px solid #ccc', borderRadius: '5px', padding: '10px', marginBottom: '20px', flex: 0.69 }}>
|
118 |
| - <legend style={styles.legendBox}>Select Team</legend> |
119 |
| - <select id="teamsDropdown" style={styles.select}>Teams</select> |
| 62 | + <legend className='legend-box'>Select Team</legend> |
| 63 | + <select id="teamsDropdown" className='select'>Teams</select> |
120 | 64 | </fieldset>
|
121 |
| - <fieldset style={styles.fieldset}> |
122 |
| - <legend style={styles.legendBox}>Agent Login</legend> |
123 |
| - <select name="LoginOption" id="LoginOption" style={styles.select} onChange={selectLoginOption}> |
124 |
| - <option value="" selected hidden>Choose Agent Login Option...</option> |
| 65 | + <fieldset className='fieldset'> |
| 66 | + <legend className='legend-box'>Agent Login</legend> |
| 67 | + <select name="LoginOption" id="LoginOption" className='select' onChange={selectLoginOption}> |
| 68 | + <option value="" hidden>Choose Agent Login Option...</option> |
125 | 69 | </select>
|
126 |
| - <input style={styles.input} id="dialNumber" name="dialNumber" placeholder="Extension/Dial Number" type="text" onInput={updateDN} /> |
127 |
| - <button id="AgentLogin" style={styles.btn} onClick={login}>Login</button> |
128 |
| - <button id="logoutAgent" style={styles.btn} onClick={logout}>Logout</button> |
| 70 | + <input className='input' id="dialNumber" name="dialNumber" placeholder="Extension/Dial Number" type="text" onInput={updateDN} /> |
| 71 | + <button id="AgentLogin" className='btn' onClick={login}>Login</button> |
| 72 | + <button id="logoutAgent" className='btn' onClick={logout}>Logout</button> |
129 | 73 | </fieldset>
|
130 | 74 | </div>
|
131 | 75 | </div>
|
|
0 commit comments