Skip to content

Commit ef7e47a

Browse files
authored
Merge pull request #2888 from brave/brave-ui-sync
Sync: Move from brave-ui to brave-core
2 parents a97f6e4 + d971dac commit ef7e47a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1672
-2
lines changed

components/brave_sync/ui/brave_sync.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { render } from 'react-dom'
77
import { Provider } from 'react-redux'
88

99
// Components
10-
import App from './components/app'
10+
import App from './containers/app'
1111

1212
// Utils
1313
import store from './store'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
* You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import styled from 'brave-ui/theme'
6+
7+
export const SectionBlock = styled<{}, 'section'>('section')`
8+
margin: 15px 0 40px;
9+
`
10+
11+
export const EnabledContentButtonGrid = styled<{}, 'footer'>('footer')`
12+
display: grid;
13+
grid-template-columns: 1fr;
14+
grid-template-rows: 1fr;
15+
grid-gap: 5px;
16+
margin: 10px 5px 0;
17+
`
18+
19+
export const SettingsToggleGrid = styled<{}, 'footer'>('footer')`
20+
display: grid;
21+
grid-template-columns: auto 1fr;
22+
grid-template-rows: 1fr;
23+
grid-gap: 5px;
24+
align-items: center;
25+
margin: 15px 0 0;
26+
`
27+
28+
export const DisabledContentButtonGrid = styled<{}, 'footer'>('footer')`
29+
display: grid;
30+
grid-template-columns: 1fr 1fr;
31+
grid-template-rows: 1fr;
32+
grid-gap: 10px;
33+
margin: 15px 0 0;
34+
`
35+
36+
interface TableGridProps {
37+
isDeviceTable?: boolean
38+
}
39+
40+
export const TableGrid = styled<TableGridProps, 'div'>('div')`
41+
align-items: center;
42+
display: grid;
43+
grid-template-columns: ${p => p.isDeviceTable ? '1fr' : '200px auto'};
44+
grid-template-rows: auto;
45+
grid-gap: ${p => p.isDeviceTable ? '0' : '50px'};
46+
`
47+
48+
export const TableButtonGrid = styled<{}, 'div'>('div')`
49+
display: grid;
50+
grid-template-rows: auto;
51+
grid-gap: 15px;
52+
grid-template-columns: 2fr 1fr 1fr;
53+
`
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
3+
* You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import styled from 'brave-ui/theme'
6+
7+
import StartImageUrl from './start_icon.svg'
8+
import DefaultImageUrl from './default_icon.svg'
9+
import AddImageUrl from './add_icon.svg'
10+
import RemoveImageUrl from './remove_icon.svg'
11+
import DesktopImageUrl from './sync_computer.svg'
12+
import MobileImageUrl from './sync_devices.svg'
13+
import MobileHandImageUrl from './sync_hand.svg'
14+
15+
const iconStyles = `
16+
margin-top: 3px;
17+
height: 60px;
18+
`
19+
20+
const deviceStyles = `
21+
margin-bottom: 10px;
22+
height: 100px;
23+
`
24+
25+
export const SyncStartIcon = styled<{}, 'img'>('img').attrs({ src: StartImageUrl })`
26+
max-width: 100%;
27+
`
28+
export const SyncDefaultIcon = styled<{}, 'img'>('img').attrs({ src: DefaultImageUrl })`${iconStyles}`
29+
export const SyncAddIcon = styled<{}, 'img'>('img').attrs({ src: AddImageUrl })`${iconStyles}`
30+
export const SyncRemoveIcon = styled<{}, 'img'>('img').attrs({ src: RemoveImageUrl })`${iconStyles}`
31+
export const SyncDesktopIcon = styled<{}, 'img'>('img').attrs({ src: DesktopImageUrl })`${deviceStyles}`
32+
export const SyncMobileIcon = styled<{}, 'img'>('img').attrs({ src: MobileImageUrl })`${deviceStyles}`
33+
export const SyncMobilePicture = styled<{}, 'img'>('img').attrs({ src: MobileHandImageUrl })`
34+
max-width: 100%;
35+
height: 150px;
36+
display: block;
37+
`
38+
39+
interface QRCodeProps {
40+
size: 'normal' | 'small'
41+
}
42+
43+
export const QRCode = styled<QRCodeProps, 'img'>('img')`
44+
display: block;
45+
width: 200px;
46+
padding: 30px;
47+
border: 1px solid #C8C8D5;
48+
max-width: 100%;
49+
`
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)