Skip to content
New issue

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

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

Already on GitHub? # to your account

Update option-inputs.tsx #47

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
26 changes: 14 additions & 12 deletions extension/src-webview/options/components/option-inputs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ export function CheckOption(props: CheckOptionProps): VNode {
// The sprotty jsx function always puts an additional 'props' key around the element, requiring this hack.
props = (props as any as {props: CheckOptionProps}).props
return (
<label htmlFor={props.id} title={props.description ?? props.name}>
<input
class-options__input="true"
type="checkbox"
title={props.description ?? props.name}
id={props.id}
checked={props.value}
on-change={() => props.onChange(!props.value)}
/>
{props.name}
</label>
<div class-options__column="true">
<label htmlFor={props.id} title={props.description ?? props.name}>
<input
class-options__input="true"
type="checkbox"
title={props.description ?? props.name}
id={props.id}
checked={props.value}
on-change={() => props.onChange(!props.value)}
/>
{props.name}
</label>
</div>
);
}

Expand Down Expand Up @@ -191,4 +193,4 @@ export function DropDownMenuOption(props: DropDownMenuProps): VNode {
</select>
</div>
);
}
}
Loading