Skip to content

Commit

Permalink
feat: remove insurance
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Jun 5, 2024
1 parent cf0de31 commit 43c47cc
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 528 deletions.
42 changes: 13 additions & 29 deletions packages/widget/src/components/Card/CardLabel.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import {
Box,
Typography,
getContrastRatio,
lighten,
styled,
} from '@mui/material';
import { Box, Typography, getContrastRatio, styled } from '@mui/material';
import { blend } from '../../utils/colors.js';

export const CardLabel = styled(Box, {
shouldForwardProp: (prop) => prop !== 'type',
})<{ type?: 'active' | 'insurance' | 'insurance-icon' }>(({ theme, type }) => {
})<{ type?: 'active' }>(({ theme, type }) => {
const backgroundColor =
type === 'active'
? theme.palette.mode === 'light'
Expand All @@ -19,35 +13,25 @@ export const CardLabel = styled(Box, {
theme.palette.secondary.main,
0.8,
)
: type?.includes('insurance')
: theme.palette.mode === 'light'
? blend(
theme.palette.background.paper,
theme.palette.success.main,
theme.palette.mode === 'light' ? 0.12 : 0.24,
theme.palette.common.black,
0.12,
)
: theme.palette.mode === 'light'
? blend(
theme.palette.background.paper,
theme.palette.common.black,
0.12,
)
: blend(
theme.palette.background.paper,
theme.palette.common.white,
0.16,
);
: blend(
theme.palette.background.paper,
theme.palette.common.white,
0.16,
);
return {
backgroundColor,
borderRadius: theme.shape.borderRadius,
color: type?.includes('insurance')
? lighten(
theme.palette.success.main,
theme.palette.mode === 'light' ? 0 : 0.24,
)
: getContrastRatio(theme.palette.common.white, backgroundColor) >= 3
color:
getContrastRatio(theme.palette.common.white, backgroundColor) >= 3
? theme.palette.common.white
: theme.palette.common.black,
padding: type === 'insurance' ? theme.spacing(0, 1.5) : 0,
padding: 0,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
Expand Down
22 changes: 0 additions & 22 deletions packages/widget/src/components/Insurance/Insurance.tsx

This file was deleted.

119 changes: 0 additions & 119 deletions packages/widget/src/components/Insurance/InsuranceCard.tsx

This file was deleted.

59 changes: 0 additions & 59 deletions packages/widget/src/components/Insurance/InsuranceCollapsed.tsx

This file was deleted.

24 changes: 0 additions & 24 deletions packages/widget/src/components/Insurance/types.ts

This file was deleted.

Loading

0 comments on commit 43c47cc

Please sign in to comment.