Skip to content

Commit

Permalink
Merge pull request twentyhq#43 from twentyhq/sammy/t-103-i-see-compan…
Browse files Browse the repository at this point in the history
…y-chip-designed-with-picture

Sammy/t 103 i see company chip designed with picture
  • Loading branch information
Samox authored Apr 19, 2023
2 parents 5560476 + ddebb35 commit bb40c1b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
15 changes: 9 additions & 6 deletions front/src/components/table/CellLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ type OwnProps = {

const StyledContainer = styled.span`
background-color: ${(props) => props.theme.tertiaryBackground};
border-radius: 4px;
border-radius: ${(props) => props.theme.spacing(1)};
color: ${(props) => props.theme.text80};
display: inline-flex;
align-items: center;
padding: 4px 8px 4px 4px;
gap: 4px;
padding: ${(props) => props.theme.spacing(1)};
gap: ${(props) => props.theme.spacing(1)};
:hover {
filter: brightness(95%);
}
img {
height: 1rem;
width: 1rem;
border-radius: 0.5rem;
height: 14px;
width: 14px;
object-fit: cover;
}
`;
Expand Down
2 changes: 1 addition & 1 deletion front/src/interfaces/company.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export interface Company {
id: number;
name: string;
logo: string;
domain: string;
}
12 changes: 6 additions & 6 deletions front/src/pages/people/People.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const defaultData: Array<Person> = [
fullName: 'Alexandre Prot',
picture: personPlaceholder,
email: 'alexandre@qonto.com',
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
company: { id: 1, name: 'Qonto', domain: 'qonto.com' },
phone: '06 12 34 56 78',
creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
Expand All @@ -59,7 +59,7 @@ const defaultData: Array<Person> = [
fullName: 'Alexandre Prot',
picture: personPlaceholder,
email: 'alexandre@qonto.com',
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
company: { id: 2, name: 'LinkedIn', domain: 'linkedin.com' },
phone: '06 12 34 56 78',
creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
Expand All @@ -70,7 +70,7 @@ const defaultData: Array<Person> = [
fullName: 'Alexandre Prot',
picture: personPlaceholder,
email: 'alexandre@qonto.com',
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
company: { id: 1, name: 'Qonto', domain: 'qonto.com' },
phone: '06 12 34 56 78',
creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
Expand All @@ -81,7 +81,7 @@ const defaultData: Array<Person> = [
fullName: 'Alexandre Prot',
picture: personPlaceholder,
email: 'alexandre@qonto.com',
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
company: { id: 1, name: 'Slack', domain: 'slack.com' },
phone: '06 12 34 56 78',
creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
Expand All @@ -92,7 +92,7 @@ const defaultData: Array<Person> = [
fullName: 'Alexandre Prot',
picture: personPlaceholder,
email: 'alexandre@qonto.com',
company: { id: 1, name: 'Qonto', logo: 'https://qonto.eu/logo.png' },
company: { id: 2, name: 'Facebook', domain: 'facebook.com' },
phone: '06 12 34 56 78',
creationDate: new Date('Feb 23, 2018'),
pipe: { id: 1, name: 'Sales Pipeline', icon: 'faUser' },
Expand Down Expand Up @@ -133,7 +133,7 @@ const columns = [
cell: (props) => (
<CellLink
name={props.row.original.company.name}
picture={props.row.original.company.logo}
picture={`https://www.google.com/s2/favicons?domain=${props.row.original.company.domain}&sz=256`}
href="#"
/>
),
Expand Down

0 comments on commit bb40c1b

Please sign in to comment.