Skip to content

Commit

Permalink
[easy][editor][client] 6/n Read-only mode: Global Parameters (#967)
Browse files Browse the repository at this point in the history
[easy][editor][client] 6/n Read-only mode: Global Parameters







- refactor `isReadonly` -> `readOnly` inside `ParametersRenderer.tsx`
- useState() to get readOnly bool

## Testplan

1. Pass readOnly=True prop in `AIConfigEditor`

| readOnly={false}  | readOnly={true} |
| ------------- | ------------- |
| <img width="981" alt="Screenshot 2024-01-18 at 11 29 08 AM"
src="https://github.com/lastmile-ai/aiconfig/assets/141073967/07747d6a-37d1-4b00-a5fb-ae8475c19044">
| <img width="1044" alt="Screenshot 2024-01-18 at 11 32 28 AM"
src="https://github.com/lastmile-ai/aiconfig/assets/141073967/673abdb3-7048-444c-9ba2-8ad746181478">
|

## Dependencies
Built ontop of #939

#961 is next on the stack

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/967).
* #962
* __->__ #967
  • Loading branch information
Ankush-lastmile authored Jan 19, 2024
2 parents 25bdb0c + 0c92735 commit eafef52
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "@mantine/core";
import { IconTrash, IconPlus } from "@tabler/icons-react";
import { debounce, uniqueId } from "lodash";
import { useState, useCallback, memo, useMemo, useContext } from "react";
import { memo, useCallback, useContext, useMemo, useState } from 'react';
import { JSONValue, JSONObject } from "aiconfig";
import AIConfigContext from "../contexts/AIConfigContext";

Expand Down

0 comments on commit eafef52

Please sign in to comment.