Skip to content

Commit

Permalink
fix: record object chip background color when idle (not hovered) (#4662)
Browse files Browse the repository at this point in the history
  • Loading branch information
emadbaqeri and ijreilly authored Apr 15, 2024
1 parent 9d99214 commit 42e50cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useContext } from 'react';
import { EntityChip } from 'twenty-ui';
import { EntityChip, EntityChipVariant } from 'twenty-ui';

import { useMapToObjectRecordIdentifier } from '@/object-metadata/hooks/useMapToObjectRecordIdentifier';
import { RecordTableRowContext } from '@/object-record/record-table/contexts/RecordTableRowContext';
Expand All @@ -11,13 +11,15 @@ export type RecordChipProps = {
record: ObjectRecord;
maxWidth?: number;
className?: string;
variant?: EntityChipVariant;
};

export const RecordChip = ({
objectNameSingular,
record,
maxWidth,
className,
variant,
}: RecordChipProps) => {
const { mapToObjectRecordIdentifier } = useMapToObjectRecordIdentifier({
objectNameSingular,
Expand All @@ -44,6 +46,7 @@ export const RecordChip = ({
linkToEntity={linkToEntity}
maxWidth={maxWidth}
className={className}
variant={variant}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactNode, useContext, useState } from 'react';
import { useInView } from 'react-intersection-observer';
import styled from '@emotion/styled';
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
import { IconEye } from 'twenty-ui';
import { EntityChipVariant, IconEye } from 'twenty-ui';

import { RecordChip } from '@/object-record/components/RecordChip';
import { RecordBoardContext } from '@/object-record/record-board/contexts/RecordBoardContext';
Expand Down Expand Up @@ -221,6 +221,7 @@ export const RecordBoardCard = () => {
<RecordChip
objectNameSingular={objectMetadataItem.nameSingular}
record={record}
variant={EntityChipVariant.Transparent}
/>
{isCompactModeActive && (
<StyledCompactIconContainer className="compact-icon-container">
Expand Down

0 comments on commit 42e50cb

Please sign in to comment.