-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate styled-system (other pages) (#1715)
* fix: toolbar * fix: `Select` story * feat: update `patterns` components * fix: `PricingTable` styles * fix: `Footer` bottom padding * feat: update `home` * fix: `home` features title text-align * feat: update `markdown` components * feat: cleanup home + Mitigate all warnings about props being passed to dom * feat: migrate `formats` page * feat: migrate `insights` page * feat: migrate `logo` page * feat: migrate `meta` page * fix: invalid bg color * feat: migrate `pdf` page * feat: migrate `screenshot` page * feat: migrate `sdk` page * feat: migrate `blog` listing page * feat: migrate `blog` detail page * feat: migrate `newsletter` page * feat: migrate `oss` page * feat: migrate `changelog` page * feat: migrate `community` page * feat: migrate `recipe` pages * fix: misc. css fixes * feat: migrate `user-agents` page * feat: migrate `docs` template * feat: migrate `payment` pages * feat: migrate `status` page * feat: migrate `enterprise` page * fix: minor `Container` improvements * fix: use undefined instead of null --------- Co-authored-by: Kiko Beats <[email protected]>
- Loading branch information
1 parent
abcf0d7
commit bd39d4c
Showing
10 changed files
with
103 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { DotsBackground, Caption, Layout } from 'components/patterns' | ||
import { transition, space, gradient, layout } from 'theme' | ||
import { transition, space, gradient, layout, theme as themeProp } from 'theme' | ||
import Markdown from 'components/markdown' | ||
import { useTheme } from 'components/hook' | ||
import styled from 'styled-components' | ||
|
@@ -62,45 +62,55 @@ const EnterprisePage = () => { | |
|
||
return ( | ||
<DotsBackground theme={theme}> | ||
<Layout theme={theme} footer={{ bg: 'transparent' }}> | ||
<Layout theme={theme} footer={{ style: { background: 'transparent' } }}> | ||
<Container | ||
pt={[2, 2, 3, 3]} | ||
justifyContent='center' | ||
alignItems='center' | ||
css={themeProp({ | ||
pt: [2, null, 3], | ||
justifyContent: 'center', | ||
alignItems: 'center' | ||
})} | ||
> | ||
<Subhead color={primary}>Microlink for</Subhead> | ||
<Subhead css={{ color: primary }}>Microlink for</Subhead> | ||
<Heading>Enterprise</Heading> | ||
<Caption | ||
color={primary} | ||
pt={[3, 3, 4, 4]} | ||
px={4} | ||
css={themeProp({ | ||
color: primary, | ||
pt: [3, null, 4], | ||
px: 4, | ||
maxWidth: layout.small | ||
})} | ||
titleize={false} | ||
maxWidth={[layout.small, layout.small, layout.small, layout.small]} | ||
> | ||
Unleash the maximum performance. Hardware, with the software baked | ||
in. | ||
</Caption> | ||
<Box | ||
pt={[3, 3, 4, 4]} | ||
color={secondary} | ||
css={` | ||
${themeProp({ | ||
pt: [3, null, 4], | ||
color: secondary | ||
})} | ||
b { | ||
color: white; | ||
} | ||
`} | ||
> | ||
<Markdown>{content}</Markdown> | ||
</Box> | ||
<Box pt={[2, 2, 3, 3]} color={secondary}> | ||
<Box css={themeProp({ pt: [2, null, 3], color: secondary })}> | ||
<GradientButton | ||
onClick={() => | ||
window.open( | ||
'mailto:[email protected]?subject=Microlink%20Enterprise&body=Hello%2C%20I%20want%20to%20upgrade%20my%20customer%20plan%20to%20Microlink%20Enterprise.%0D%0A%0D%0ACan%20you%20tell%20me%20more%20about%20the%20details%3F%0D%0A%0D%0AThank%20you!%0D%0A', | ||
'_blank', | ||
'noopener noreferrer' | ||
)} | ||
) | ||
} | ||
> | ||
<Caps bg='black' px={3} py={2} color={primary}> | ||
<Caps | ||
css={themeProp({ bg: 'black', px: 3, py: 2, color: primary })} | ||
> | ||
Get in touch | ||
</Caps> | ||
</GradientButton> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import { Caption, Layout } from 'components/patterns' | |
import React, { useState, useEffect } from 'react' | ||
import { useQueryState } from 'components/hook' | ||
import { encode } from 'helpers' | ||
import { layout } from 'theme' | ||
import { layout, theme } from 'theme' | ||
|
||
import { | ||
Confetti, | ||
|
@@ -45,7 +45,7 @@ const getCaption = paymentState => { | |
<> | ||
Payment not processed.{' '} | ||
<Link | ||
pt={2} | ||
css={theme({ pt: 2 })} | ||
href={`mailto:[email protected]?${encode(ERROR_MAIL_OPTS)}`} | ||
> | ||
Contact us | ||
|
@@ -65,16 +65,21 @@ const PaymentPage = () => { | |
|
||
return ( | ||
<Layout> | ||
<Container alignItems='center' pt={2}> | ||
<Container css={theme({ alignItems: 'center', pt: 2 })}> | ||
{paymentState === PAYMENT_STATE.success && <Confetti />} | ||
<Heading px={5} titleize={false} maxWidth={layout.large}> | ||
<Heading | ||
css={theme({ px: 5, maxWidth: layout.large })} | ||
titleize={false} | ||
> | ||
{getTitle(paymentState)} | ||
</Heading> | ||
<Caption | ||
pt={[3, 3, 4, 4]} | ||
px={[4, 4, 0, 0]} | ||
css={theme({ | ||
pt: [3, null, 4], | ||
px: [4, null, 0], | ||
maxWidth: layout.small | ||
})} | ||
titleize={false} | ||
maxWidth={[layout.small, layout.small, layout.small, layout.small]} | ||
> | ||
{getCaption(paymentState)} | ||
</Caption> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
/* global fetch */ | ||
|
||
import { useFingerprint, useSiteMetadata, useQueryState } from 'components/hook' | ||
import { colors, fonts, fontWeights, layout, radii, transition } from 'theme' | ||
import { | ||
colors, | ||
fonts, | ||
fontWeights, | ||
layout, | ||
radii, | ||
transition, | ||
theme | ||
} from 'theme' | ||
import { Caption, Layout } from 'components/patterns' | ||
import { loadStripe } from '@stripe/stripe-js/pure' | ||
import React, { useEffect, useState } from 'react' | ||
|
@@ -69,7 +77,10 @@ const getCaption = paymentState => { | |
return ( | ||
<> | ||
Payment not updated.{' '} | ||
<Link href={`mailto:[email protected]?${encode(ERROR_MAIL_OPTS)}`}> | ||
<Link | ||
css={theme({ pt: 2 })} | ||
href={`mailto:[email protected]?${encode(ERROR_MAIL_OPTS)}`} | ||
> | ||
Contact us | ||
</Link> | ||
. | ||
|
@@ -133,11 +144,10 @@ const CheckoutForm = ({ | |
/> | ||
<Button | ||
loading={!stripe || paymentState === PAYMENT_STATE.processing} | ||
mt={3} | ||
css={theme({ mt: 3, width: '100%' })} | ||
type='submit' | ||
width='100%' | ||
> | ||
<Caps fontSize={1}>Update Card</Caps> | ||
<Caps css={theme({ fontSize: 1 })}>Update Card</Caps> | ||
</Button> | ||
</form> | ||
) | ||
|
@@ -187,21 +197,28 @@ const PaymentUpdatePage = () => { | |
|
||
return ( | ||
<Layout> | ||
<Container pt={2} justifyContent='center' alignItems='center'> | ||
<Container | ||
css={theme({ alignItems: 'center', justifyContent: 'center', pt: 2 })} | ||
> | ||
{paymentState === PAYMENT_STATE.success && <Confetti />} | ||
<Heading px={5} titleize={false} maxWidth={layout.large}> | ||
<Heading | ||
css={theme({ px: 5, maxWidth: layout.large })} | ||
titleize={false} | ||
> | ||
{getTitle(isLoading ? PAYMENT_STATE.redirected : paymentState)} | ||
</Heading> | ||
<Caption | ||
pt={[3, 3, 4, 4]} | ||
px={[4, 4, 0, 0]} | ||
css={theme({ | ||
pt: [3, null, 4], | ||
px: [4, null, 0], | ||
maxWidth: layout.small | ||
})} | ||
titleize={false} | ||
maxWidth={layout.small} | ||
> | ||
{getCaption(isLoading ? PAYMENT_STATE.redirected : paymentState)} | ||
</Caption> | ||
{!isLoading && !query.status && ( | ||
<Box pt={[3, 3, 4, 4]} width={7}> | ||
<Box css={theme({ pt: [3, null, 4], width: 7 })}> | ||
<Elements | ||
stripe={stripePromise} | ||
options={{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters