Show the whole Rule on one review card, with quiet flags for missing cards and Continue once each question has one.
This commit is contained in:
1 parent
cc878e3c19
commit
6e2e1915ae
30 files changed
+571
-218
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
import { memo } from "react";
|
||||
import Chip from "../Chip";
|
||||
import Icon from "../../asset/icon/Icon";
|
||||
import InputLabel from "../../type/InputLabel";
|
||||
import type { MultiSelectViewProps } from "./MultiSelect.types";
|
||||
|
||||
@@ -15,9 +16,11 @@ function MultiSelectView({
|
||||
onAddClick,
|
||||
addButton,
|
||||
addButtonText,
|
||||
flag,
|
||||
addButtonAriaLabel,
|
||||
chipSelectAriaLabel,
|
||||
chipDeselectAriaLabel,
|
||||
chipMissingWordsAriaLabel,
|
||||
formHeader = true,
|
||||
helperText: helperTextProp,
|
||||
errorMessage,
|
||||
@@ -94,13 +97,19 @@ function MultiSelectView({
|
||||
palette={palette}
|
||||
size={chipSize}
|
||||
disabled={chipDisabled}
|
||||
hasWarning={option.hasWarning}
|
||||
ariaLabel={
|
||||
isCustom || !option.label
|
||||
? undefined
|
||||
: (isSelected
|
||||
? chipDeselectAriaLabel
|
||||
: chipSelectAriaLabel
|
||||
).replace("{label}", option.label)
|
||||
: option.hasWarning
|
||||
? chipMissingWordsAriaLabel.replace(
|
||||
"{label}",
|
||||
option.label,
|
||||
)
|
||||
: (isSelected
|
||||
? chipDeselectAriaLabel
|
||||
: chipSelectAriaLabel
|
||||
).replace("{label}", option.label)
|
||||
}
|
||||
onClick={() => {
|
||||
if (!isCustom && !chipDisabled && onChipClick) {
|
||||
@@ -180,6 +189,22 @@ function MultiSelectView({
|
||||
)}
|
||||
</button>
|
||||
)}
|
||||
{flag ? (
|
||||
<span
|
||||
className={`inline-flex items-center gap-[var(--space-100)] text-x-small-paragraph ${
|
||||
isInverse
|
||||
? "text-[color:var(--color-content-invert-primary)]"
|
||||
: "text-[color:var(--color-content-default-primary)]"
|
||||
}`}
|
||||
>
|
||||
<Icon
|
||||
name="warning"
|
||||
size={12}
|
||||
className="shrink-0 text-current"
|
||||
/>
|
||||
{flag}
|
||||
</span>
|
||||
) : null}
|
||||
</div>
|
||||
{errorMessage ? (
|
||||
<p
|
||||
|
||||
Reference in new issue
Block a user