Skip to content

Commit

Permalink
fix: improve style and accessibility of AI-generated ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
swouf committed Nov 6, 2024
1 parent fc48884 commit a1ff508
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/modules/common/response/Response.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Response: FC<ResponseProps> = ({
const renderTopResponseAnnotation = (): JSX.Element => {
if (isAiGenerated) {
return (
<TopAnnotationTypography variant="caption" color="primary">
<TopAnnotationTypography variant="caption" color="white">
{t('AI_GENERATED')}
</TopAnnotationTypography>
);
Expand All @@ -121,7 +121,7 @@ const Response: FC<ResponseProps> = ({
const getTopAnnotationBoxStyle = (): SxProps<Theme> => {
if (isAiGenerated) {
return {
backgroundColor: 'white',
backgroundColor: theme.palette.primary.main,
};
}
const rLength =
Expand All @@ -134,14 +134,6 @@ const Response: FC<ResponseProps> = ({
};
};

const getCardActionStyle = (): SxProps<Theme> | undefined =>
isAiGenerated
? {
backgroundColor: theme.palette.primary.main,
color: theme.palette.primary.contrastText,
}
: undefined;

if (responseContent) {
return (
<Box
Expand Down Expand Up @@ -171,7 +163,7 @@ const Response: FC<ResponseProps> = ({
}}
data-cy={RESPONSE_CY}
>
<CardContent sx={{ minHeight: '32pt', ...getCardActionStyle() }}>
<CardContent sx={{ minHeight: '32pt' }}>
{typeof responseContent === 'string' ? (
<ResponsePart>{responseContent}</ResponsePart>
) : (
Expand Down

0 comments on commit a1ff508

Please sign in to comment.