-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nathan Richards
committed
Nov 24, 2023
1 parent
730e406
commit 011bf9c
Showing
24 changed files
with
144 additions
and
184 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
6 changes: 0 additions & 6 deletions
6
packages/widget/src/components/Header/TransactionHistoryButton.style.ts
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
packages/widget/src/components/Header/TransactionHistoryButton.tsx
This file was deleted.
Oops, something went wrong.
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
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
20 changes: 0 additions & 20 deletions
20
packages/widget/src/pages/SettingsPage/SettingsCard/BadgedAdditionalInformation.tsx
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
packages/widget/src/pages/SettingsPage/SettingsCard/BadgedValue.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,22 @@ | ||
import type { PropsWithChildren } from 'react'; | ||
import type { BadgeProps } from '@mui/material'; | ||
import { Badge } from '../../../components/Badge'; | ||
import { SummaryValue } from './SettingCard.style'; | ||
|
||
interface BadgedValueProps { | ||
showBadge: boolean; | ||
badgeColor?: BadgeProps['color']; | ||
} | ||
|
||
export const BadgedValue: React.FC<PropsWithChildren<BadgedValueProps>> = ({ | ||
showBadge, | ||
badgeColor, | ||
children, | ||
}) => | ||
showBadge && badgeColor ? ( | ||
<Badge variant="dot" color={badgeColor}> | ||
<SummaryValue>{children}</SummaryValue> | ||
</Badge> | ||
) : ( | ||
<SummaryValue>{children}</SummaryValue> | ||
); |
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
19 changes: 10 additions & 9 deletions
19
packages/widget/src/pages/SettingsPage/SettingsCard/SettingCardButton.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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import type { MouseEventHandler, PropsWithChildren } from 'react'; | ||
import type { SettingCardTitle } from './SettingCard.types'; | ||
import type { SettingCardTitle } from './types'; | ||
import { SettingCard } from './SettingCard'; | ||
import { | ||
SettingSummaryButton, | ||
SettingSummaryText, | ||
SettingTitle, | ||
SummaryRowButton, | ||
SummaryValue, | ||
SummaryTitleContainer, | ||
} from './SettingCard.style'; | ||
|
||
interface SettingCardButtonProps extends SettingCardTitle { | ||
onClick: MouseEventHandler; | ||
} | ||
|
||
export const SettingCardButton: React.FC< | ||
PropsWithChildren<SettingCardButtonProps> | ||
> = ({ onClick, icon, title, children }) => ( | ||
<SettingCard> | ||
<SettingSummaryButton onClick={onClick} focusRipple> | ||
<SettingTitle> | ||
<SummaryRowButton onClick={onClick} disableRipple> | ||
<SummaryTitleContainer> | ||
{icon} | ||
<SettingSummaryText>{title}</SettingSummaryText> | ||
</SettingTitle> | ||
<SummaryValue>{title}</SummaryValue> | ||
</SummaryTitleContainer> | ||
{children} | ||
</SettingSummaryButton> | ||
</SummaryRowButton> | ||
</SettingCard> | ||
); |
Oops, something went wrong.