Skip to content

Commit

Permalink
Add mobile app links to about
Browse files Browse the repository at this point in the history
  • Loading branch information
Rokt33r committed Apr 19, 2020
1 parent 93ec282 commit 0afcb56
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
39 changes: 38 additions & 1 deletion src/components/PreferencesModal/AboutTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { openNew } from '../../lib/platform'
import Image from '../atoms/Image'
import AppLink from '../atoms/AppLink'
import { useTranslation } from 'react-i18next'
import { primaryButtonStyle } from '../../lib/styled/styleFunctions'

const AboutContents = styled.div`
max-width: 360px;
Expand Down Expand Up @@ -77,6 +78,22 @@ const AboutContents = styled.div`
}
`

const MobileLink = styled.button`
${primaryButtonStyle}
padding: 0 16px;
height: 40px;
line-height: 1;
border-width: initial;
border-style: none;
border-color: initial;
border-image: initial;
border-radius: 2px;
margin-bottom: 10px;
.subtext {
font-size: 12px;
}
`
interface PrimaryLinkProps {
href: string
children: string
Expand Down Expand Up @@ -132,7 +149,27 @@ const AboutTab = () => {
</div>
<div className='about-platform'>
<SectionHeader>{t('about.platform')}</SectionHeader>
<AppLink />
<div>
<AppLink />{' '}
<MobileLink
onClick={() => {
openNew(
'https://apps.apple.com/us/app/boostnote-mobile/id1498182749'
)
}}
>
iOS App
</MobileLink>{' '}
<MobileLink
onClick={() => {
openNew(
'https://play.google.com/store/apps/details?id=com.boostio.boostnote'
)
}}
>
Android
</MobileLink>
</div>
</div>
<div className='about-community'>
<SectionHeader>{t('about.community')}</SectionHeader>
Expand Down
1 change: 0 additions & 1 deletion src/components/atoms/AppLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { primaryButtonStyle } from '../../lib/styled/styleFunctions'

const AppLinkContainer = styled.button`
${primaryButtonStyle}
display: block;
padding: 0 16px;
height: 40px;
line-height: 1;
Expand Down

0 comments on commit 0afcb56

Please sign in to comment.