-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
a4166ab
commit 6e612a8
Showing
6 changed files
with
134 additions
and
35 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
packages/mobile/src/components/premium-track-purchase-drawer/AudioMatchSection.tsx
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { View } from 'react-native' | ||
|
||
import { makeStyles } from 'app/styles' | ||
|
||
import { Text } from '../core/Text' | ||
|
||
const useStyles = makeStyles(({ palette, spacing }) => ({ | ||
root: { | ||
backgroundColor: palette.secondary, | ||
border: palette.secondaryDark2, | ||
paddingHorizontal: spacing(8), | ||
paddingVertical: spacing(2) | ||
}, | ||
text: { | ||
textAlign: 'center' | ||
} | ||
})) | ||
|
||
const messages = { | ||
earn: (amount: number) => `Earn ${amount} $AUDIO when you buy this track!` | ||
} | ||
|
||
type AudioMatchSectionProps = { | ||
amount: number | ||
} | ||
|
||
export const AudioMatchSection = ({ amount }: AudioMatchSectionProps) => { | ||
const styles = useStyles() | ||
return ( | ||
<View style={styles.root}> | ||
<Text | ||
style={styles.text} | ||
variant='label' | ||
textTransform='uppercase' | ||
fontSize='large' | ||
color='white' | ||
> | ||
{messages.earn(amount)} | ||
</Text> | ||
</View> | ||
) | ||
} |
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
11 changes: 11 additions & 0 deletions
11
...web/src/components/premium-content-purchase-modal/components/AudioMatchSection.module.css
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.root { | ||
width: 100%; | ||
display: flex; | ||
padding: var(--unit-2) var(--unit-8); | ||
margin-bottom: var(--unit-6); | ||
justify-content: center; | ||
align-items: center; | ||
align-self: stretch; | ||
border: 1px solid var(--secondary-dark-2); | ||
background: var(--secondary); | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/web/src/components/premium-content-purchase-modal/components/AudioMatchSection.tsx
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Text } from 'components/typography' | ||
|
||
import styles from './AudioMatchSection.module.css' | ||
|
||
const messages = { | ||
earn: (amount: number) => `Earn ${amount} $AUDIO when you buy this track!` | ||
} | ||
|
||
type AudioMatchSectionProps = { | ||
amount: number | ||
} | ||
|
||
export const AudioMatchSection = ({ amount }: AudioMatchSectionProps) => { | ||
return ( | ||
<div className={styles.root}> | ||
<Text variant='label' size='large' color='white'> | ||
{messages.earn(amount)} | ||
</Text> | ||
</div> | ||
) | ||
} |