-
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
cd09949
commit 6956101
Showing
11 changed files
with
144 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ export enum PurchaseMethod { | |
} | ||
|
||
export enum Vendors { | ||
STRIPE = 'stripe' | ||
STRIPE = 'Stripe' | ||
} |
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 |
---|---|---|
|
@@ -18,3 +18,7 @@ | |
flex-direction: column; | ||
align-items: flex-start; | ||
} | ||
|
||
.summaryTableRowValue { | ||
width: 100%; | ||
} |
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
59 changes: 59 additions & 0 deletions
59
packages/web/src/components/mobile-filter-button/MobileFilterButton.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,59 @@ | ||
import { useState } from 'react' | ||
|
||
import { Vendors } from '@audius/common' | ||
import { Box, Flex, IconCaretDown, Text } from '@audius/harmony' | ||
|
||
import ActionDrawer from 'components/action-drawer/ActionDrawer' | ||
|
||
type MobileFilterButtonTypes = { | ||
options: { label: string }[] | ||
onClose?: () => void | ||
onSelect?: (label: string) => void | ||
zIndex?: number | ||
} | ||
|
||
export const MobileFilterButton = ({ | ||
options, | ||
onClose, | ||
onSelect, | ||
zIndex | ||
}: MobileFilterButtonTypes) => { | ||
const [isOpen, setIsOpen] = useState(false) | ||
const actions = options.map((option) => ({ | ||
text: option.label, | ||
onClick: () => { | ||
onSelect?.(option.label) | ||
} | ||
})) | ||
return ( | ||
<Box> | ||
<Flex | ||
alignItems='center' | ||
justifyContent='center' | ||
border='strong' | ||
borderRadius='s' | ||
pt='s' | ||
pb='s' | ||
pl='m' | ||
pr='m' | ||
mt='m' | ||
gap='xs' | ||
onClick={() => setIsOpen((open) => !open)} | ||
> | ||
<Text variant='title' strength='weak' size='s'> | ||
{Vendors.STRIPE} | ||
</Text> | ||
<IconCaretDown size='s' color='default' /> | ||
</Flex> | ||
<ActionDrawer | ||
actions={actions} | ||
onClose={() => { | ||
setIsOpen(false) | ||
onClose?.() | ||
}} | ||
isOpen={isOpen} | ||
zIndex={zIndex} | ||
/> | ||
</Box> | ||
) | ||
} |
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