Skip to content

Commit

Permalink
Update EditorControls.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
melnikga committed Mar 21, 2024
1 parent 2b413d5 commit b3e965b
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions components/Editor/EditorControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,18 @@ const EditorControls = ({
</span>
</Button>
</div>

<div className="w-full md:w-60 lg:mr-20">
<Select
isSearchable={false}
classNamePrefix="select"
menuPlacement="auto"
value={exampleNameValue}
options={examplesOptions}
instanceId={useId()}
onChange={handleChangeExampleOption}
isDisabled={isCompileDisabled}
/>
</div>
<Input
ref={inputRef}
rightIcon={
Expand All @@ -127,27 +138,15 @@ const EditorControls = ({
}}
readOnly={isCompileDisabled}
value={programArguments}
placeholder={`Enter program arguments...`}
className={cn('grow border bg-gray-200 dark:bg-gray-800', {
placeholder={`Program arguments`}
className={cn('grow border bg-gray-200 dark:bg-gray-800 ', {
'dark:border-gray-800 border-gray-200': areProgramArgumentsValid,
'border-red-500': !areProgramArgumentsValid,
})}
inputClassName={cn({
'text-red-500': !areProgramArgumentsValid,
})}
/>
<div className="w-full lg:w-28 ">
<Select
isSearchable={false}
classNamePrefix="select"
menuPlacement="auto"
value={exampleNameValue}
options={examplesOptions}
instanceId={useId()}
onChange={handleChangeExampleOption}
isDisabled={isCompileDisabled}
/>
</div>

<div>
<Button
Expand All @@ -156,7 +155,7 @@ const EditorControls = ({
size="sm"
contentClassName="justify-center"
>
Compile and run
Run
</Button>
</div>
</div>
Expand Down

0 comments on commit b3e965b

Please sign in to comment.