Skip to content

Commit

Permalink
Update connection component
Browse files Browse the repository at this point in the history
Signed-off-by: Senali <[email protected]>
  • Loading branch information
senali-d committed Nov 26, 2023
1 parent 2af5c7c commit 3293b56
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions packages/components/src/custom/ConnectionChip/index.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import { Chip } from 'base';
import { ChipProps, TooltipProps } from '@mui/material';
import React from 'react';
import { Tooltip } from '../base/Tooltip';
import { Chip } from '../../base/Chip';
import { Tooltip } from '../../base/Tooltip';

export interface ConnectioChipProps {
tooltip: string;
tooltipPlacement?: string;
chipLabel: boolean;
chipIcon?: Element;
chipDeleteIcon?: Element;
style?: React.CSSProperties;
tooltipPlacement?: TooltipProps['placement'];
variant?: ChipProps['variant'];
label: string;
icon?: React.ReactElement;
onClick?: () => void;
onDelete?: () => void;
style?: React.CSSProperties;
}

function ConnectioChip({
tooltip,
tooltipPlacement = 'top',
chipLabel,
chipIcon,
chipDeleteIcon,
variant = 'filled',
label,
icon,
onClick,
onDelete,
style,
onDelete
...rest
}: ConnectioChipProps): JSX.Element {
return (
<Tooltip title={tooltip} placement={tooltipPlacement}>
Expand All @@ -37,12 +41,13 @@ function ConnectioChip({
background: 'white',
maxWidth: '230px'
}}
variant="outlined"
label={chipLabel}
variant={variant}
label={label}
onClick={onClick}
onDelete={onDelete}
deleteIcon={chipDeleteIcon}
icon={chipIcon}
icon={icon}
style={style}
{...rest}
/>
</Tooltip>
);
Expand Down

0 comments on commit 3293b56

Please sign in to comment.