mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[web] Consolidate ide settings in `features/ide-settings` GitOrigin-RevId: cbf0ff069399f418d8cb0d8165628df190046ea9
28 lines
630 B
TypeScript
28 lines
630 B
TypeScript
import React from 'react'
|
|
|
|
export default function Setting({
|
|
label,
|
|
controlId,
|
|
children,
|
|
description = undefined,
|
|
}: {
|
|
label: React.ReactNode
|
|
description: React.ReactNode | undefined
|
|
controlId: string
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<div id={`setting-${controlId}`} className="ide-setting">
|
|
<div>
|
|
<label htmlFor={controlId} className="ide-setting-title">
|
|
{label}
|
|
</label>
|
|
{description && (
|
|
<div className="ide-setting-description">{description}</div>
|
|
)}
|
|
</div>
|
|
<div className="ide-setting-input">{children}</div>
|
|
</div>
|
|
)
|
|
}
|