Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

579 B
Raw Blame
import { Field, FieldContent, FieldDescription, FieldTitle, Toggle } from "@app/components/v3";

import { PolicyEditorProps } from "./types";

export const BooleanPolicyEditor = ({ label, description, value, onChange }: PolicyEditorProps) => (
  <Field orientation="horizontal" className="items-center!">
    <FieldContent>
      <FieldTitle>{label}</FieldTitle>
      <FieldDescription>{description}</FieldDescription>
    </FieldContent>
    <Toggle
      checked={value === true}
      variant="pam"
      onCheckedChange={(checked) => onChange(checked)}
    />
  </Field>
);