feat(react/settings): port code block settings

This commit is contained in:
Elian Doran
2025-08-18 11:21:09 +03:00
parent 3ba0bcea4e
commit 234d3997b1
5 changed files with 146 additions and 169 deletions

View File

@@ -14,10 +14,12 @@ export default function FormGroup({ label, title, className, children, descripti
return (
<div className={`form-group ${className} ${disabled ? "disabled" : ""}`} title={title}
style={{ "margin-bottom": "15px" }}>
<label style={{ width: "100%" }} ref={labelRef}>
{ label
? <label style={{ width: "100%" }} ref={labelRef}>
{label && <div style={{ "margin-bottom": "10px" }}>{label}</div> }
{children}
</label>
: children}
{description && <small className="form-text">{description}</small>}
</div>

View File

@@ -2,7 +2,7 @@ import type { ComponentChildren } from "preact";
type OnChangeListener = (newValue: string) => void;
interface FormSelectGroup<T> {
export interface FormSelectGroup<T> {
title: string;
items: T[];
}

View File

@@ -24,7 +24,7 @@ function getProps({ className, html, style }: RawHtmlProps) {
}
}
function getHtml(html: string | HTMLElement | JQuery<HTMLElement>) {
export function getHtml(html: string | HTMLElement | JQuery<HTMLElement>) {
if (typeof html === "object" && "length" in html) {
html = html[0];
}