Implemented comment thread target picker with new dropdown components (#295)
* First draft of new relation picker and usage in comments --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import styled from '@emotion/styled';
|
||||
|
||||
import { Avatar } from '@/users/components/Avatar';
|
||||
|
||||
export type CompanyChipPropsType = {
|
||||
name: string;
|
||||
picture?: string;
|
||||
@ -15,6 +16,8 @@ const StyledContainer = styled.span`
|
||||
gap: ${(props) => props.theme.spacing(1)};
|
||||
padding: ${(props) => props.theme.spacing(1)};
|
||||
|
||||
user-select: none;
|
||||
|
||||
:hover {
|
||||
filter: brightness(95%);
|
||||
}
|
||||
@ -30,10 +33,11 @@ function CompanyChip({ name, picture }: CompanyChipPropsType) {
|
||||
return (
|
||||
<StyledContainer data-testid="company-chip">
|
||||
{picture && (
|
||||
<img
|
||||
data-testid="company-chip-image"
|
||||
src={picture?.toString()}
|
||||
alt={`${name}-company-logo`}
|
||||
<Avatar
|
||||
avatarUrl={picture?.toString()}
|
||||
placeholder={name}
|
||||
type="squared"
|
||||
size={14}
|
||||
/>
|
||||
)}
|
||||
{name}
|
||||
|
||||
Reference in New Issue
Block a user