Skip to content

Commit

Permalink
Imported from brave-ui: Revert "Merge pull request #308 from brave/sy…
Browse files Browse the repository at this point in the history
…nc_img"

This reverts commit 7ea9178dd26d1d16e6882af6bb64b3500ae78332, reversing
changes made to aa520cf3cf4232b6ce4ae988209cd46a9e848918.
  • Loading branch information
cezaraugusto committed Aug 1, 2019
1 parent f9d7c5f commit d884afa
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 105 deletions.
1 change: 0 additions & 1 deletion src/features/sync/images/add_icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/features/sync/images/default_icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/features/sync/images/desktop_icon.svg

This file was deleted.

46 changes: 0 additions & 46 deletions src/features/sync/images/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/features/sync/images/mobile_icon.svg

This file was deleted.

Binary file removed src/features/sync/images/mobile_picture.png
Binary file not shown.
1 change: 0 additions & 1 deletion src/features/sync/images/remove_icon.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/features/sync/images/start_icon.svg

This file was deleted.

4 changes: 4 additions & 0 deletions src/features/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ export {
} from './grid'
export {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid,
DeviceGrid,
DeviceContainer,
DeviceImage,
ViewSyncCodeGrid,
QRCode,
ScanGrid,
MobileHandImage,
QRCodeContainer,
ThreeColumnButtonGrid,
ThreeColumnButtonGridCol1,
Expand Down
21 changes: 21 additions & 0 deletions src/features/sync/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export const ModalHeader = styled<{}, 'header'>('header')`
margin-bottom: 20px;
`

export const ModalIcon = styled<{}, 'img'>('img')`
margin-top: 3px;
height: 60px;
`

export const ModalTitle = styled(Heading)`
font-weight: 500;
font-size: 26px;
Expand Down Expand Up @@ -83,6 +88,11 @@ export const DeviceContainer = styled<{}, 'div'>('div')`
align-items: center;
`

export const DeviceImage = styled<{}, 'img'>('img')`
margin-bottom: 20px;
height: 100px;
`

export const ScanGrid = styled<{}, 'div'>('div')`
display: grid;
height: 100%;
Expand All @@ -92,6 +102,11 @@ export const ScanGrid = styled<{}, 'div'>('div')`
max-width: 550px;
`

export const MobileHandImage = styled<{}, 'img'>('img')`
max-width: 100%;
display: block;
`

export const QRCodeContainer = styled<{}, 'div'>('div')`
display: flex;
flex-direction: column;
Expand All @@ -110,3 +125,9 @@ export const ViewSyncCodeGrid = styled<{}, 'div'>('div')`
grid-gap: 20px;
margin: 0 0 25px;
`

export const QRCode = styled<{}, 'img'>('img')`
max-width: 100%;
display: block;
width: 140px;
`
5 changes: 2 additions & 3 deletions stories/features/sync/disabledContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
import DeviceType from './modals/deviceType'
import EnterSyncCode from './modals/enterSyncCode'

// Images
import { SyncStartIcon } from '../../../src/features/sync/images'
const syncStart = require('../../assets/img/sync/sync_start.svg')

// Utils
import { getLocale } from './page/fakeLocale'
Expand Down Expand Up @@ -69,7 +68,7 @@ export default class SyncDisabledContent extends React.PureComponent<{}, State>
: null
}
<TableGrid>
<SyncStartIcon />
<img src={syncStart} />
<div>
<Title level={2}>{getLocale('syncTitle')}</Title>
<Paragraph>{getLocale('syncDescription')}</Paragraph>
Expand Down
10 changes: 5 additions & 5 deletions stories/features/sync/modals/addNewChainCameraOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import Modal from '../../../../src/components/popupModals/modal'
import TextAreaClipboard from '../../../../src/components/formControls/textareaClipboard'

// Feature-specific components
import { ModalHeader, ModalTitle, ModalSubTitle, ModalContent, ThreeColumnButtonGrid, ThreeColumnButtonGridCol2, ThreeColumnButtonGridCol1 } from '../../../../src/features/sync'

// Images
import { SyncAddIcon } from '../../../../src/features/sync/images'
import { ModalHeader, ModalTitle, ModalIcon, ModalSubTitle, ModalContent, ThreeColumnButtonGrid, ThreeColumnButtonGridCol2, ThreeColumnButtonGridCol1 } from '../../../../src/features/sync'

// Modals
import ScanCode from './scanCode'
Expand All @@ -22,6 +19,9 @@ import ScanCode from './scanCode'
import { getLocale } from '../page/fakeLocale'
import data from '../page/fakeData'

// Images
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
fromMobileScreen?: boolean
onClose: () => void
Expand Down Expand Up @@ -54,7 +54,7 @@ export default class AddNewChainCameraOptionModal extends React.PureComponent<Pr
: null
}
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>
{
Expand Down
9 changes: 5 additions & 4 deletions stories/features/sync/modals/addNewChainNoCamera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ import TextAreaClipboard from '../../../../src/components/formControls/textareaC
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid
} from '../../../../src/features/sync'

// Images
import { SyncAddIcon } from '../../../../src/features/sync/images'

// Utils
import { getLocale } from '../page/fakeLocale'
import data from '../page/fakeData'

// Images
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
onClose: () => void
}
Expand All @@ -36,7 +37,7 @@ export default class AddNewChainNoCameraModal extends React.PureComponent<Props,
return (
<Modal id='addNewChainNoCameraModal' onClose={onClose} size='small'>
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>{getLocale('enterThisCode')}</ModalTitle>
<ModalSubTitle>{getLocale('syncChainCodeHowTo')}</ModalSubTitle>
Expand Down
16 changes: 10 additions & 6 deletions stories/features/sync/modals/deviceType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ import Modal from '../../../../src/components/popupModals/modal'
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
DeviceGrid,
DeviceContainer,
DeviceImage,
ModalSubTitle
} from '../../../../src/features/sync'

// Images
import { SyncAddIcon, SyncMobileIcon, SyncDesktopIcon } from '../../../../src/features/sync/images'

// Modals
import AddNewChainNoCamera from './addNewChainNoCamera'
import ScanCode from './scanCode'

// Utils
import { getLocale } from '../page/fakeLocale'

// Images
import syncMobileImg from '../../../assets/img/sync/sync_mobile.svg'
import syncDesktopImg from '../../../assets/img/sync/sync_desktop.svg'
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
mainDeviceName: string
onClose: () => void
Expand Down Expand Up @@ -70,15 +74,15 @@ export default class DeviceTypeModal extends React.PureComponent<Props, State> {
: null
}
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>{getLocale('letsSync')}<br />{mainDeviceName}”.</ModalTitle>
<ModalSubTitle>{getLocale('chooseDeviceType')}</ModalSubTitle>
</div>
</ModalHeader>
<DeviceGrid>
<DeviceContainer>
<SyncMobileIcon />
<DeviceImage src={syncMobileImg} />
<Button
level='primary'
type='accent'
Expand All @@ -88,7 +92,7 @@ export default class DeviceTypeModal extends React.PureComponent<Props, State> {
/>
</DeviceContainer>
<DeviceContainer>
<SyncDesktopIcon />
<DeviceImage src={syncDesktopImg} />
<Button
level='primary'
type='accent'
Expand Down
5 changes: 3 additions & 2 deletions stories/features/sync/modals/enterSyncCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import TextAreaClipboard from '../../../../src/components/formControls/textareaC
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
Expand All @@ -26,7 +27,7 @@ import {
import { getLocale } from '../page/fakeLocale'

// Images
import { SyncDefaultIcon } from '../../../../src/features/sync/images'
import syncIcon from '../../../assets/img/sync/sync_icon.svg'

interface Props {
onClose: () => void
Expand Down Expand Up @@ -74,7 +75,7 @@ export default class EnterSyncCodeModal extends React.PureComponent<Props, State
: null
}
<ModalHeader>
<SyncDefaultIcon />
<ModalIcon src={syncIcon} />
<div>
<ModalTitle level={1}>{getLocale('enterSyncCode')}</ModalTitle>
<ModalSubTitle>{getLocale('enterSyncCodeDescription')}</ModalSubTitle>
Expand Down
Loading

0 comments on commit d884afa

Please sign in to comment.