Whitelist styles
This commit is contained in:
parent
d91eeb74d1
commit
f2f99e3aba
2 changed files with 43 additions and 12 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useState, useEffect } from 'react'
|
||||
import { Box, Label, Input, Flex, Button } from 'theme-ui'
|
||||
import { Box, Label, Input, Flex, Button, Close } from 'theme-ui'
|
||||
import LocationInput from './LocationInput'
|
||||
import ConfigurationSelect from './ConfigurationSelect'
|
||||
import IPData from './IPData'
|
||||
|
|
@ -42,7 +42,7 @@ const WhitelistPage = ({ tab }: any) => {
|
|||
display: tab === 'whitelist' ? 'block' : 'none',
|
||||
}}
|
||||
>
|
||||
<Box sx={{ fontSize: '20px', mb: '8px' }}>Whitelist</Box>
|
||||
<Box sx={{ fontSize: '20px', mb: '12px' }}>Whitelist</Box>
|
||||
<Flex>
|
||||
<Input name="url" value={currentUrl} spellCheck="false" />
|
||||
<Button
|
||||
|
|
@ -55,14 +55,39 @@ const WhitelistPage = ({ tab }: any) => {
|
|||
Add
|
||||
</Button>
|
||||
</Flex>
|
||||
{whitelist.length ? (
|
||||
<Box
|
||||
sx={{
|
||||
border: '1px solid ',
|
||||
borderRadius: '4px',
|
||||
borderColor: 'grey',
|
||||
p: '2px 8px',
|
||||
my: '8px',
|
||||
}}
|
||||
>
|
||||
{whitelist.map((element, index) => {
|
||||
return (
|
||||
<div key={index}>
|
||||
<h2>{element}</h2>
|
||||
</div>
|
||||
<Flex
|
||||
key={index}
|
||||
sx={{
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
my: '8px',
|
||||
}}
|
||||
>
|
||||
{element}{' '}
|
||||
<Close
|
||||
sx={{ width: '24px', height: '24px' }}
|
||||
onClick={() =>
|
||||
setWhitelist(whitelist.filter((item) => item !== element))
|
||||
}
|
||||
/>
|
||||
</Flex>
|
||||
)
|
||||
})}
|
||||
</Box>
|
||||
) : null}
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
12
src/theme.ts
12
src/theme.ts
|
|
@ -10,7 +10,7 @@ export const theme: Theme = {
|
|||
redDark: '#e2525a',
|
||||
green: '#26de81',
|
||||
greenDark: '#22c774',
|
||||
grey: '#BCC2C9',
|
||||
grey: '#989898',
|
||||
},
|
||||
styles: {
|
||||
root: {
|
||||
|
|
@ -27,7 +27,7 @@ export const theme: Theme = {
|
|||
input: {
|
||||
p: '2px 8px',
|
||||
mb: '8px',
|
||||
borderColor: 'gray',
|
||||
borderColor: 'grey',
|
||||
'&:focus': {
|
||||
borderColor: 'primaryDark',
|
||||
outline: 'none',
|
||||
|
|
@ -35,7 +35,7 @@ export const theme: Theme = {
|
|||
},
|
||||
select: {
|
||||
p: '2px 8px',
|
||||
borderColor: 'gray',
|
||||
borderColor: 'grey',
|
||||
'&:focus': {
|
||||
borderColor: 'primaryDark',
|
||||
outline: 'none',
|
||||
|
|
@ -66,5 +66,11 @@ export const theme: Theme = {
|
|||
// bg: 'primaryDark',
|
||||
// },
|
||||
},
|
||||
close: {
|
||||
cursor: 'pointer',
|
||||
color: 'text',
|
||||
p: 0,
|
||||
m: 0,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue