Added/fixed styles
This commit is contained in:
parent
35a96dca1b
commit
4cf0fb3de7
6 changed files with 90 additions and 65 deletions
|
|
@ -10,9 +10,9 @@ const Icon = ({ icon }: any) => {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
color: 'white',
|
color: 'background',
|
||||||
':hover': {
|
':hover': {
|
||||||
backgroundColor: '#8750A7',
|
backgroundColor: 'primaryDark',
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
31
src/pages/Popup/LocationPage.tsx
Normal file
31
src/pages/Popup/LocationPage.tsx
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
import React, { useState, useEffect } from 'react'
|
||||||
|
import { Box, Label, Input, Select } from 'theme-ui'
|
||||||
|
|
||||||
|
const LocationPage = () => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
sx={{
|
||||||
|
m: '12px',
|
||||||
|
width: '100%',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Box sx={{ fontSize: '20px', mb: '8px' }}>Location</Box>
|
||||||
|
<Label htmlFor="configuration">Configuration</Label>
|
||||||
|
<Select name="configuration" id="configuration" mb={'8px'}>
|
||||||
|
<option>None</option>
|
||||||
|
<option>Custom</option>
|
||||||
|
<option>Match IP</option>
|
||||||
|
</Select>
|
||||||
|
<Label htmlFor="timezone">Timezone</Label>
|
||||||
|
<Input name="timezone" id="username" />
|
||||||
|
<Label htmlFor="locale">Locale</Label>
|
||||||
|
<Input name="locale" id="locale" />
|
||||||
|
<Label htmlFor="latitude">Latitude</Label>
|
||||||
|
<Input name="latitude" id="latitude" />
|
||||||
|
<Label htmlFor="longitude">Longitude</Label>
|
||||||
|
<Input name="longitude" id="longitude" />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LocationPage
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
import { ThemeProvider } from 'theme-ui'
|
import { ThemeProvider, Flex } from 'theme-ui'
|
||||||
import { theme } from '../../theme'
|
import { theme } from '../../theme'
|
||||||
import { Home, MapPin, Globe, Command, Users, List } from 'react-feather'
|
import { Home, MapPin, Globe, Users, List } from 'react-feather'
|
||||||
import Icon from './Icon'
|
import Icon from './Icon'
|
||||||
|
import LocationPage from './LocationPage'
|
||||||
// import Navbar from './Navbar'
|
// import Navbar from './Navbar'
|
||||||
// import IpSettings from './IpSettings'
|
// import IpSettings from './IpSettings'
|
||||||
// import ProfileSelect from './ProfileSelect'
|
// import ProfileSelect from './ProfileSelect'
|
||||||
|
|
@ -17,33 +18,28 @@ const Popup = () => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<div className="App">
|
<Flex
|
||||||
<div
|
sx={{
|
||||||
|
width: '350px',
|
||||||
|
height: '350px',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Flex
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
minWidth: '36px',
|
||||||
height: '350px',
|
backgroundColor: 'primary',
|
||||||
width: '100%',
|
alignItems: 'center',
|
||||||
|
flexDirection: 'column',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<Icon icon={<Home size={20} />} />
|
||||||
sx={{
|
<Icon icon={<MapPin size={20} />} />
|
||||||
width: '36px',
|
<Icon icon={<Globe size={20} />} />
|
||||||
backgroundColor: 'var(--main)',
|
<Icon icon={<List size={20} />} />
|
||||||
display: 'flex',
|
<Icon icon={<Users size={20} />} />
|
||||||
alignItems: 'center',
|
</Flex>
|
||||||
flexDirection: 'column',
|
<LocationPage />
|
||||||
}}
|
</Flex>
|
||||||
>
|
|
||||||
<Icon icon={<Home size={20} />} />
|
|
||||||
<Icon icon={<MapPin size={20} />} />
|
|
||||||
<Icon icon={<Globe size={20} />} />
|
|
||||||
<Icon icon={<Command size={20} />} />
|
|
||||||
<Icon icon={<List size={20} />} />
|
|
||||||
<Icon icon={<Users size={20} />} />
|
|
||||||
</div>
|
|
||||||
<div style={{}}></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
:root {
|
|
||||||
--main: #A965D1;
|
|
||||||
--text: #212121;
|
|
||||||
--background: #fff;
|
|
||||||
--scrollbar: #ccc;
|
|
||||||
--navbar: #A965D1;
|
|
||||||
--icon: #aab7b8;
|
|
||||||
--border: #f0f3f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
color: var(--text);
|
|
||||||
background-color: var(--background);
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 22px;
|
|
||||||
width: 350px;
|
|
||||||
height: 350px;
|
|
||||||
margin: 0;
|
|
||||||
font-family: 'Segoe UI', Tahoma, sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=checkbox] {
|
|
||||||
vertical-align: middle;
|
|
||||||
position: relative;
|
|
||||||
bottom: 1px;
|
|
||||||
margin: 0 4px 0 0
|
|
||||||
}
|
|
||||||
|
|
@ -2,7 +2,6 @@ import React from 'react'
|
||||||
import { render } from 'react-dom'
|
import { render } from 'react-dom'
|
||||||
|
|
||||||
import Popup from './Popup'
|
import Popup from './Popup'
|
||||||
import './index.css'
|
|
||||||
|
|
||||||
render(<Popup />, window.document.querySelector('#app-container'))
|
render(<Popup />, window.document.querySelector('#app-container'))
|
||||||
|
|
||||||
|
|
|
||||||
44
src/theme.ts
44
src/theme.ts
|
|
@ -1,14 +1,40 @@
|
||||||
import type { Theme } from 'theme-ui'
|
import type { Theme } from 'theme-ui'
|
||||||
|
|
||||||
export const theme: Theme = {
|
export const theme: Theme = {
|
||||||
fonts: {
|
|
||||||
body: 'system-ui, sans-serif',
|
|
||||||
heading: '"Avenir Next", sans-serif',
|
|
||||||
monospace: 'Menlo, monospace',
|
|
||||||
},
|
|
||||||
colors: {
|
colors: {
|
||||||
text: '#000',
|
text: '#333333',
|
||||||
background: '#fff',
|
background: '#FDFDFD',
|
||||||
primary: '#33e',
|
primary: '#a965d1',
|
||||||
|
primaryDark: '#8750A7',
|
||||||
},
|
},
|
||||||
}
|
styles: {
|
||||||
|
root: {
|
||||||
|
backgroundColor: 'body',
|
||||||
|
color: 'text',
|
||||||
|
fontSize: '16px',
|
||||||
|
lineHeight: '22px',
|
||||||
|
margin: '0',
|
||||||
|
fontFamily: "'Segoe UI', Tahoma, sans-serif",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
forms: {
|
||||||
|
label: {},
|
||||||
|
input: {
|
||||||
|
p: '2px 8px',
|
||||||
|
mb: '8px',
|
||||||
|
borderColor: 'gray',
|
||||||
|
'&:focus': {
|
||||||
|
borderColor: 'primaryDark',
|
||||||
|
outline: 'none',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
p: '2px 8px',
|
||||||
|
borderColor: 'gray',
|
||||||
|
'&:focus': {
|
||||||
|
borderColor: 'primaryDark',
|
||||||
|
outline: 'none',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue