mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 14:49:01 +02:00
af41215058
Add opt-in for editor redesign GitOrigin-RevId: 29ec8f4045a6bf29ab26a5ce5bceff70fb3aba6e
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>
|
|
)
|
|
}
|