Skip to content

Commit 3abdbdf

Browse files
committed
dark mode only missing dropdown menu on Link component
1 parent 7c54d1d commit 3abdbdf

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

app/src/components/left/DragDropPanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const DragDropPanel = (props): JSX.Element => {
3535
<Grid
3636
id="HTMLItemsGrid"
3737
>
38-
<h3>HTML ELEMENTS</h3>
38+
<h3 style={ {color: isThemeLight ? '#000' : '#fff'} }>HTML ELEMENTS</h3>
3939
{htmlTypesToRender.map(option => {
4040
if (!['Switch', 'LinkTo', 'LinkHref', 'Image'].includes(option.name)) {
4141
return (
@@ -51,7 +51,7 @@ const DragDropPanel = (props): JSX.Element => {
5151
}
5252

5353
})}
54-
{state.projectType === "Classic React" ? <h3>REACT ROUTER</h3> : null}
54+
{state.projectType === "Classic React" ? <h3 style={ {color: isThemeLight ? '#000' : '#fff' } }>REACT ROUTER</h3> : null}
5555
{htmlTypesToRender.map(option => {
5656
if ((option.name === 'Switch' || option.name === 'LinkTo') && state.projectType === "Classic React") {
5757
return (
@@ -67,7 +67,7 @@ const DragDropPanel = (props): JSX.Element => {
6767
}
6868
})}
6969

70-
{state.projectType === "Next.js" ? <h3>Next.js</h3> : null}
70+
{state.projectType === "Next.js" ? <h3 style={ {color: isThemeLight? '#000': "#fff"} }>Next.js</h3> : null}
7171
{htmlTypesToRender.map(option => {
7272
if ((option.framework === 'nextjs') && state.projectType === "Next.js") {
7373
return (

app/src/components/left/HTMLItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ const HTMLItem : React.FC<{
120120
return ( // HTML Elements
121121
<Grid item xs={5} key={`html-g${name}`}>
122122
{ id <= 20 &&
123-
<div ref={drag} className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
123+
<div ref={drag} style={ { borderColor: isThemeLight? '#000' : '#fff' } } className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
124124
<h3>{name}</h3>
125125
</div>
126126
}
127127
{ id > 20 &&
128128
<span id="customHTMLElement">
129-
<div ref={drag} className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
129+
<div ref={drag} style={ { borderColor: isThemeLight? '#000' : '#fff' } } className={isThemeLight ? `${classes.HTMLPanelItem} ${classes.lightThemeFontColor}` : `${classes.HTMLPanelItem} ${classes.darkThemeFontColor}`} id="HTMLItem">
130130
<h3>{name}</h3>
131131
</div>
132132
<button id="newElement" style={{color: isThemeLight ? '#186BB4' : 'white' }} onClick={() => deleteAllInstances(id)} >X</button>

app/src/components/main/AddLink.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import MenuItem from '@material-ui/core/MenuItem';
66
import Select from '@material-ui/core/Select';
77
import { InputLabel } from '@material-ui/core';
88

9+
import { styleContext } from '../../containers/AppContainer';
910

1011
function AddLink({ id }: AddRoutes) {
12+
const { isThemeLight } = useContext(styleContext);
1113
const [state, dispatch] = useContext(StateContext);
1214
console.log('AddLink\'s state', state);
1315
const handleClick = (id) => {
@@ -33,10 +35,11 @@ function AddLink({ id }: AddRoutes) {
3335
return (
3436
<div style={{ padding: '1px', float: 'right' }}>
3537
<FormControl size='small'>
36-
<InputLabel>Pages</InputLabel>
38+
<InputLabel style={ { color: isThemeLight? '#000' : '#fff'} }>Pages</InputLabel>
3739
<Select variant="outlined"
3840
onChange={handlePageSelect}
3941
id="page-select"
42+
style={ isThemeLight? {backgroundColor: '#eef0f1', color: '#000', border: '1px solid black'} : {backgroundColor: 'gray', color: '#fff', border: '1px solid white'}}
4043
>
4144
{dropDown}
4245
</Select>

app/src/context/HTMLTypes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ const HTMLTypes: HTMLType[] = [
224224
tag: 'Link',
225225
name: 'LinkHref',
226226
style: {},
227-
placeHolderShort: 'Link',
227+
placeHolderShort: 'LinkHref',
228228
placeHolderLong: '',
229229
icon: ListIcon,
230230
framework: 'nextjs',

0 commit comments

Comments
 (0)