592 B28 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8import type {ReactNode} from 'react';
9
10import {DropdownField} from './DropdownFields';
11
12export function Setting({
13 children,
14 title,
15 description,
16}: {
17 children: ReactNode;
18 title: ReactNode;
19 description?: ReactNode;
20}) {
21 return (
22 <DropdownField title={title}>
23 {description && <div className="setting-description">{description}</div>}
24 {children}
25 </DropdownField>
26 );
27}
28