Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging #493

Merged
merged 2 commits into from
Nov 8, 2023
Merged
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
15 changes: 2 additions & 13 deletions packages/core-ui/command-ui/src/template-input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,13 @@ export const TemplateInput: React.FC<TemplateInputProps> = (props) => {
top: 0,
left: 0
}}>
{/* <Editor
value=""
extraLib='declare type Device = string | {};'
/> */}

<BaseTemplateInput
value={props.value}
options={props.options}
onFocus={(focus) => !focus && handleBlur()}
onChange={(e) => setValue(e)} />
{/* <TextField
onBlur={handleBlur}
multiline
minRows={4}
autoFocus
value={value}
onChange={(e) => setValue(e.target.value)}
label={props.label}
variant='standard'/> */}


<IconButton
onClick={handleBlur}
Expand Down
11 changes: 10 additions & 1 deletion packages/core-ui/command-ui/src/template-input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ export const BaseInput = (props: any) => {
)
}

export const BaseTemplateInput = (props: any) => {
export interface BaseTemplateInputProps {
options: any;

value?: string;

onFocus?: (focus: boolean) => void;
onChange?: (e: string) => void;
}

export const BaseTemplateInput : React.FC<BaseTemplateInputProps> = (props) => {
const editor = useRef<HTMLDivElement>();

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/editors/interface/src/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const Sidebar: React.FC<SidebarProps> = (props) => {
sx={{
display: 'flex',
height: '100%',
maxWidth: '250px',
width: '250px',
flexDirection: 'column',
'& .MuiCollapse-wrapperInner': {
display: 'flex'
Expand Down
Loading