Skip to content

Commit c8f94de

Browse files
committed
feat: some styling
1 parent 1483b88 commit c8f94de

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

packages/app-builder/src/components/Screenings/FreeformSearch/DatasetsPopover.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ export const DatasetsPopover = ({ selectedDatasets, onApply }: DatasetsPopoverPr
8282
<Popover.Trigger asChild>
8383
<button
8484
type="button"
85-
className="text-s bg-purple-background-light text-purple-primary flex w-full items-center justify-between rounded px-2 py-2"
85+
className={clsx(
86+
'text-s flex w-full items-center justify-between rounded px-2 py-2',
87+
selectedDatasets.length > 0
88+
? 'bg-purple-background-light text-purple-primary'
89+
: 'border-grey-border text-grey-secondary bg-surface-card border',
90+
)}
8691
>
8792
<span className="font-medium">{t('screenings:freeform_search.datasets_label')}</span>
8893
<div className="flex items-center gap-1">

packages/app-builder/src/components/Screenings/FreeformSearch/EntityTypePopover.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ export const EntityTypePopover = ({ value, onApply }: EntityTypePopoverProps) =>
3030
<Popover.Trigger asChild>
3131
<button
3232
type="button"
33-
className="text-s bg-purple-background-light text-purple-primary flex w-full items-center justify-between rounded px-2 py-2"
33+
className={clsx(
34+
'text-s flex w-full items-center justify-between rounded px-2 py-2',
35+
hasSelection
36+
? 'bg-purple-background-light text-purple-primary'
37+
: 'border-grey-border text-grey-secondary bg-surface-card border',
38+
)}
3439
>
3540
<span className="font-medium">{t('screenings:freeform_search.entity_type_label')}</span>
3641
<div className="flex items-center gap-1">

packages/app-builder/src/components/Screenings/FreeformSearch/ThresholdPopover.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as Popover from '@radix-ui/react-popover';
2+
import clsx from 'clsx';
23
import { useState } from 'react';
34
import { useTranslation } from 'react-i18next';
45
import { ButtonV2, Input } from 'ui-design-system';
@@ -50,7 +51,12 @@ export const ThresholdPopover = ({ value, onApply }: ThresholdPopoverProps) => {
5051
<Popover.Trigger asChild>
5152
<button
5253
type="button"
53-
className="text-s bg-purple-background-light text-purple-primary flex w-full items-center justify-between rounded px-2 py-2"
54+
className={clsx(
55+
'text-s flex w-full items-center justify-between rounded px-2 py-2',
56+
hasValue
57+
? 'bg-purple-background-light text-purple-primary'
58+
: 'border-grey-border text-grey-secondary bg-surface-card border',
59+
)}
5460
>
5561
<span className="font-medium">{t('screenings:freeform_search.threshold_label')}</span>
5662
<div className="flex items-center gap-1">

0 commit comments

Comments
 (0)