Skip to content

Commit

Permalink
[easy][editor][client] 6/n Read-only mode: Global Parameters
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Ankush Pala ankush@lastmileai.dev committed Jan 18, 2024
1 parent 25bdb0c commit 0c92735
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 0c92735

Please sign in to comment.