style.js 2.4 KB
Newer Older
Muhammadali's avatar
Muhammadali committed
1 2 3 4 5 6
/** @format */

import styled from 'styled-components';
import CallIcon from '@mui/icons-material/Dialpad';
import { boxDialerWidjetPosition } from '../../lib/boxDialerWidjetPosition';

Muhammadali's avatar
Muhammadali committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20
const colorTypeFunc = (type) => {
	switch (type) {
		case 'pending':
			return 'orange';
			break;
		case 'connected':
			return '#a0c13d';
			break;

		default:
			break;
	}
};

Muhammadali's avatar
Muhammadali committed
21
const BxMiniWidjetUiStyle = styled.div`
Muhammadali's avatar
Muhammadali committed
22
	font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
Muhammadali's avatar
Muhammadali committed
23
	/* background-color: ${({ status = '' }) =>
Muhammadali's avatar
Muhammadali committed
24 25 26 27
		status === 'pending'
			? 'orange'
			: status === 'connected'
			? '#a0c13d'
Muhammadali's avatar
Muhammadali committed
28 29 30
			: '#ccc'}; */
	/* background-color: ${({ status = '' }) => (status ? status : '#333')}; */
	${({ status }) => (status ? status : {})}
Muhammadali's avatar
Muhammadali committed
31 32
	height: 64px;
	width: 64px;
Muhammadali's avatar
Muhammadali committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
	border-radius: 13px;
	cursor: pointer;
	color: white;
	z-index: 999;
	position: fixed;
	display: grid;
	align-items: center;
	grid-template-columns: 1fr;
	grid-template-rows: 1fr 10px;

	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;

Muhammadali's avatar
Muhammadali committed
49
	${({ position }) => boxDialerWidjetPosition.bxmini[position].block}
Muhammadali's avatar
Muhammadali committed
50 51 52 53 54

	.left {
		display: flex;
		flex-direction: column;
		align-items: center;
Muhammadali's avatar
Muhammadali committed
55 56 57
		margin: 0;
		padding: 0;
		box-sizing: border-box;
Muhammadali's avatar
Muhammadali committed
58 59 60 61 62 63
	}
	.right {
	}
	.title {
		font-size: 20px;
		font-weight: 600;
Muhammadali's avatar
Muhammadali committed
64 65 66
		margin: 0;
		padding: 0;
		box-sizing: border-box;
Muhammadali's avatar
Muhammadali committed
67 68 69 70 71
	}
	.bottom {
		height: 100%;
		grid-column: 1/3;
		grid-row: 2/3;
Muhammadali's avatar
Muhammadali committed
72 73 74
		margin: 0;
		padding: 0;
		box-sizing: border-box;
Muhammadali's avatar
Muhammadali committed
75
	}
Muhammadali's avatar
Muhammadali committed
76 77 78
`;

BxMiniWidjetUiStyle.ReasonTest = styled.div`
Muhammadali's avatar
Muhammadali committed
79
	box-sizing: border-box;
Muhammadali's avatar
Muhammadali committed
80 81 82 83 84 85 86 87 88 89 90 91 92 93
	border-radius: 10px;
	padding: 0 1px;
	margin: 0 5px;
	font-size: 12px;

	${({ reason }) =>
		reason == 'free'
			? {
					color: '#ffffffab',
			  }
			: {
					backgroundColor: 'orange',
					color: '#000',
			  }}
Muhammadali's avatar
Muhammadali committed
94 95
`;
BxMiniWidjetUiStyle.StatusLine = styled.div`
Muhammadali's avatar
Muhammadali committed
96 97
	margin: 0;
	box-sizing: border-box;
Muhammadali's avatar
Muhammadali committed
98 99 100
	height: 100%;
	border-bottom-left-radius: 30px;
	border-bottom-right-radius: 30px;
Muhammadali's avatar
Muhammadali committed
101
	/* background-color: ${({ status = '' }) =>
Muhammadali's avatar
Muhammadali committed
102 103 104 105
		status === 'pending'
			? 'orange'
			: status === 'connected'
			? '#a0c13d'
Muhammadali's avatar
Muhammadali committed
106 107
			: '#ccc'}; */
	${({ status }) => (status ? status : {})}
Muhammadali's avatar
Muhammadali committed
108 109 110 111 112 113 114 115 116 117
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 0 10px 0 0;
	.verison {
		font-size: 10px;
		font-weight: bold;
		float: right;
	}
`;
Muhammadali's avatar
Muhammadali committed
118

Muhammadali's avatar
Muhammadali committed
119 120 121 122 123 124
const DialPadIcon = styled(CallIcon)`
	font-size: 26px;
`;

export { DialPadIcon };
export default BxMiniWidjetUiStyle;