main
js 30 lines 550 Bytes
Raw
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 * @flow
8 */
9
10 import * as React from 'react';
11
12 import styles from './Badge.css';
13
14 type Props = {
15 className?: string,
16 children: React$Node,
17 ...
18 };
19
20 export default function Badge({
21 className = '',
22 children,
23 ...props
24 }: Props): React.Node {
25 return (
26 <div {...props} className={`${styles.Badge} ${className}`}>
27 {children}
28 </div>
29 );
30 }