Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/react/src/components/Constraint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Constraint_Input = {
label: React.ReactNode;
children?: React.ReactNode;
onClickAddField?: () => void;
className?: string;
};

/* -------------------------------------------------------------------------- */
Expand All @@ -29,11 +30,15 @@ const Constraint: React.FC<Constraint_Input> = ({
label,
children,
onClickAddField,
className,
}) => {
return (
<Disclosure defaultOpen={true}>
{({ open }) => (
<Container makeGutter={true} className="p-3 bg-white">
<Container
makeGutter={true}
className={classNames("p-3 bg-white", className)}
>
<Container>
<Disclosure.Button as="button" className={COMMON_FOCUS_CLASSES}>
{open && <ChevronUpIcon className="size-6" />}
Expand Down
4 changes: 2 additions & 2 deletions apps/react/src/components/InputSelectButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type InputSelectButtons_Input<
value: TValue;
onChange?: (value: TValue) => void;
onBlur?: () => void;
canDeselect?: boolean,
canDeselect?: boolean;
options: TOptions;
};

Expand All @@ -41,7 +41,7 @@ export default function InputSelectButtons<
key={opt.id}
className={classNames("-uppercase", [
isSelected(opt),
"bg-blue-200 hover:bg-blue-100",
"bg-blue-200 hover:bg-blue-100 selected",
])}
disabled={opt?.specialStatus === "disabled"}
onClick={() => {
Expand Down
4 changes: 2 additions & 2 deletions apps/react/src/consts/classes.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ export const CODEX_BRAND_CLASSES = "font-bold text-xl text-gray-600";
/* Navbar */
/* -------------------------------------------------------------------------- */

export const MAIN_CONTAINER_MT = "mt-20";
export const MAIN_CONTAINER_MT = "mt-16";
// Note: We can't just prepend a "-" to the const above
// because Tailwind needs to find the whole class name
// somewhere in the source code.
export const MAIN_CONTAINER_REMOVE_MT = "-mt-20";
export const MAIN_CONTAINER_REMOVE_MT = "-mt-16";

/* -------------------------------------------------------------------------- */
/* Misc */
Expand Down
4 changes: 4 additions & 0 deletions apps/react/src/consts/options.const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ export const YES_OR_NO = [
{ id: "yes", label: "Yes" },
{ id: "no", label: "No" },
] satisfies BasicOption[];

export const isYes = (value: any) => typeof value === "object" && value?.id === "yes";

export const isNo = (value: any) => typeof value === "object" && value?.id === "no";
Loading