Skip to content

Commit

Permalink
fix: masqurade tip
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlLiu2023 committed Apr 10, 2023
1 parent c3c2d6a commit 04d4ef8
Showing 1 changed file with 75 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
...getStyles(customCss),
}

const isMobileCustomStyles: SxProps = {
backgroundColor: `${color || '#FFFFFF'}`,
color: getContrastColor(color || '#FFFFFF'),
}

return (
<>
{
Expand All @@ -175,12 +180,7 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
marginTop: '10px',
...customStyles,
}}
onClick={() => {
setOpenPage({
isOpen: true,
openUrl: '/',
})
}}
onClick={() => endActing()}
variant="contained"
startIcon={<GroupIcon />}
>
Expand Down Expand Up @@ -290,7 +290,7 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {

{

isOpen && (
isOpen && !isMobile && (
<Snackbar
sx={{
zIndex: '110000',
Expand All @@ -299,6 +299,7 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
height: '52px',
color: '#FFFFFF',
...sx,
...customStyles,
}}
anchorOrigin={getLocation(location) || defaultLocation}
open
Expand All @@ -309,8 +310,6 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
width: '100%',
}}
>
{
!isMobile && (
<Box
sx={{
display: 'flex',
Expand All @@ -324,16 +323,16 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
}}
/>
{
isExpansion && (
<Box
sx={{
fontWeight: 400,
}}
>
You are masqueraded as
</Box>
)
}
isExpansion && (
<Box
sx={{
fontWeight: 400,
}}
>
You are masqueraded as
</Box>
)
}
<Box
sx={{
fontWeight: '600',
Expand All @@ -343,45 +342,68 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
{salesRepCompanyName}
</Box>
{
isExpansion && (
<Box
sx={{
fontWeight: 500,
fontSize: '13px',
cursor: 'pointer',
}}
onClick={() => endActing()}
>
{text}
</Box>
)
}
isExpansion && (
<Box
sx={{
fontWeight: 500,
fontSize: '13px',
cursor: 'pointer',
}}
onClick={() => endActing()}
>
{text}
</Box>
)
}

{
isExpansion ? (
<KeyboardArrowLeftIcon
onClick={() => setExpansion(false)}
sx={{
ml: '10px',
}}
/>
)
: (
<KeyboardArrowRightIcon
onClick={() => setExpansion(true)}
sx={{
ml: '10px',
}}
/>
)
}
isExpansion ? (
<KeyboardArrowLeftIcon
onClick={() => setExpansion(false)}
sx={{
ml: '10px',
}}
/>
)
: (
<KeyboardArrowRightIcon
onClick={() => setExpansion(true)}
sx={{
ml: '10px',
}}
/>
)
}

</Box>
)
}
</Box>

</Snackbar>
)
}

{

{
isMobile && (
isOpen && isMobile && (
<Snackbar
sx={{
zIndex: '110000',
backgroundColor: '#ED6C02',
borderRadius: '4px',
height: '52px',
color: '#FFFFFF',
...sx,
...isMobileCustomStyles,
}}
anchorOrigin={defaultLocation}
open
>
<Box
sx={{
padding: '5px 15px',
width: '100%',
}}
>
<Box
sx={{
display: 'flex',
Expand Down Expand Up @@ -425,9 +447,6 @@ export const B3MasquradeGobalTip = (props: B3MasquradeGobalTipProps) => {
</Box>

</Box>
)
}

</Box>

</Snackbar>
Expand Down

0 comments on commit 04d4ef8

Please sign in to comment.