Skip to content

Commit 35406b8

Browse files
authored
Merge pull request #33 from oslabs-beta/styling
Last minute touch-ups before launch
2 parents 794b813 + 1b79a98 commit 35406b8

File tree

4 files changed

+48
-8
lines changed

4 files changed

+48
-8
lines changed

app/components/Occupied/Occupied.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ const Occupied = React.memo(() => {
8282

8383
>
8484
<Button
85-
style={currentStyle}
8685
className={classes.paper}
8786
onClick={() => setModal({isOpen:true,type:'envModal'})}
8887
>

app/components/SearchBar/styles.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
align-items: center;
1111
}
1212

13+
.form :hover{
14+
cursor: pointer;
15+
}
16+
1317
.inputContainer {
1418
position: relative;
1519
display: flex;
@@ -18,10 +22,11 @@
1822
.searchIconSvg {
1923
transform: scale(0.1) translate(758.9px, -720px);
2024
position: absolute;
21-
fill: white;
25+
fill: rgb(131, 129, 133);
2226
}
2327
}
2428

29+
2530
#textInput {
2631
background-color: transparent;
2732
font-family: 'Roboto';

app/components/Styling.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ const lightAndDark = {
4444
backgroundColor: '#F7F8F8',
4545
color: '#24272A',
4646
},
47+
darkModeButtons:{
48+
backgroundColor: '#F3F3F7',
49+
color: '#1C202D',
50+
},
51+
lightModeButtons:{
52+
backgroundColor: '#1C202D',
53+
color: '#1C202D',
54+
}
4755
};
4856

4957
export default lightAndDark;

app/components/TransferColumns.tsx

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { GridColDef, DataGrid } from '@mui/x-data-grid';
88
import { GridToolbar } from '@mui/x-data-grid/components';
99
import * as DashboardContext from '../context/DashboardContext';
1010
import lightAndDark from './Styling';
11+
import Box from '@mui/material/Box';
1112

1213
import { Button, TextField } from '@mui/material';
1314

@@ -38,6 +39,7 @@ const TransferColumns = React.memo(() => {
3839

3940
const currentMode = mode === 'light' ? lightAndDark.lightModeText : lightAndDark.darkModeText;
4041
const currentStyle = mode === 'light' ? lightAndDark.lightModeData : lightAndDark.darkModeData;
42+
const buttonStyle = mode === 'light' ? lightAndDark.lightModeButtons : lightAndDark.darkModeButtons;
4143

4244
useEffect(() => {
4345
if (healthData) {
@@ -159,20 +161,20 @@ const TransferColumns = React.memo(() => {
159161

160162
// makes the column titles for the selection grid
161163
const columns: GridColDef[] = [
162-
{ field: 'id', headerName: 'ID', flex: 1, headerClassName: 'style',},
164+
{ field: 'id', headerName: 'ID', flex: 1, headerClassName: 'grid-header',},
163165
{
164166
field: 'tag',
165167
headerName: 'Category',
166168
flex: 1,
167169
editable: true,
168-
headerClassName: 'style',
170+
headerClassName: 'grid-header',
169171
},
170172
{
171173
field: 'title',
172174
headerName: 'Metric',
173175
flex: 3,
174176
editable: true,
175-
headerClassName: 'style',
177+
headerClassName: 'grid-header',
176178
},
177179
];
178180

@@ -220,8 +222,32 @@ const TransferColumns = React.memo(() => {
220222
</Button>
221223
</div>
222224
<div id="transferTest">
223-
<div style={{ height: '500px', width: '100%' }}>
224-
225+
226+
<Box
227+
sx={{
228+
height: '500px',
229+
width: '100%',
230+
'& .grid-header': {
231+
backgroundColor: currentStyle.backgroundColor,
232+
color: currentStyle.color,
233+
},
234+
'& .MuiDataGrid-root .MuiDataGrid-cell': {
235+
color: currentStyle.color,
236+
},
237+
'& .MuiInputBase-input': {
238+
color: currentStyle.color, // Change text color of the search input
239+
},
240+
'& .MuiSvgIcon-root': {
241+
backgroundColor: '#E3E3F0', // Change color of the search icon
242+
},
243+
'& .MuiDataGrid-columnHeaderTitleContainer': {
244+
backgroundColor: currentStyle.backgroundColor,
245+
},
246+
'& .MuiTablePagination-displayedRows': {
247+
color: currentStyle.color,
248+
},
249+
}}
250+
>
225251
<DataGrid
226252
// style={currentStyle }
227253
rows={rows}
@@ -231,6 +257,8 @@ const TransferColumns = React.memo(() => {
231257
slotProps={{
232258
toolbar: {
233259
showQuickFilter: true,
260+
261+
234262
},
235263
}}
236264
pageSizeOptions ={[10]}
@@ -246,6 +274,7 @@ const TransferColumns = React.memo(() => {
246274
}}
247275

248276
/>
277+
</Box>
249278

250279
</div>
251280
{selectedRows.length > 0 && (
@@ -263,7 +292,6 @@ const TransferColumns = React.memo(() => {
263292
>
264293
{selectedRows}
265294
</ol>
266-
</div>
267295
</>
268296
);
269297
});

0 commit comments

Comments
 (0)