addons/isl/src/Setting.tsxblame
View source
b69ab311/**
b69ab312 * Copyright (c) Meta Platforms, Inc. and affiliates.
b69ab313 *
b69ab314 * This source code is licensed under the MIT license found in the
b69ab315 * LICENSE file in the root directory of this source tree.
b69ab316 */
b69ab317
b69ab318import type {ReactNode} from 'react';
b69ab319
b69ab3110import {DropdownField} from './DropdownFields';
b69ab3111
b69ab3112export function Setting({
b69ab3113 children,
b69ab3114 title,
b69ab3115 description,
b69ab3116}: {
b69ab3117 children: ReactNode;
b69ab3118 title: ReactNode;
b69ab3119 description?: ReactNode;
b69ab3120}) {
b69ab3121 return (
b69ab3122 <DropdownField title={title}>
b69ab3123 {description && <div className="setting-description">{description}</div>}
b69ab3124 {children}
b69ab3125 </DropdownField>
b69ab3126 );
b69ab3127}