Skip to content

Commit 2af5c7c

Browse files
committed
Added connection chip
Signed-off-by: Senali <[email protected]>
1 parent 4e0fda7 commit 2af5c7c

File tree

1 file changed

+51
-0
lines changed
  • packages/components/src/custom/ConnectionChip

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { Chip } from 'base';
2+
import React from 'react';
3+
import { Tooltip } from '../base/Tooltip';
4+
5+
export interface ConnectioChipProps {
6+
tooltip: string;
7+
tooltipPlacement?: string;
8+
chipLabel: boolean;
9+
chipIcon?: Element;
10+
chipDeleteIcon?: Element;
11+
style?: React.CSSProperties;
12+
onDelete?: () => void;
13+
}
14+
15+
function ConnectioChip({
16+
tooltip,
17+
tooltipPlacement = 'top',
18+
chipLabel,
19+
chipIcon,
20+
chipDeleteIcon,
21+
style,
22+
onDelete
23+
}: ConnectioChipProps): JSX.Element {
24+
return (
25+
<Tooltip title={tooltip} placement={tooltipPlacement}>
26+
<Chip
27+
sx={{
28+
paddingY: '10px',
29+
padding: '5px 6px !important',
30+
color: 'black',
31+
fontSize: '14px',
32+
textTransform: 'uppercase',
33+
fontWeight: 400,
34+
height: 'unset',
35+
borderRadius: '100px',
36+
border: '0.5px solid #51636B',
37+
background: 'white',
38+
maxWidth: '230px'
39+
}}
40+
variant="outlined"
41+
label={chipLabel}
42+
onDelete={onDelete}
43+
deleteIcon={chipDeleteIcon}
44+
icon={chipIcon}
45+
style={style}
46+
/>
47+
</Tooltip>
48+
);
49+
}
50+
51+
export default ConnectioChip;

0 commit comments

Comments
 (0)