| 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 | |
| 8 | import type {ReactProps} from './utils'; |
| 9 | |
| 10 | import * as stylex from '@stylexjs/stylex'; |
| 11 | |
| 12 | const styles = stylex.create({ |
| 13 | hr: { |
| 14 | margin: '4px 0', |
| 15 | border: 'none', |
| 16 | borderTop: '1px solid var(--divider-background)', |
| 17 | outline: 'none', |
| 18 | height: 0, |
| 19 | width: '100%', |
| 20 | }, |
| 21 | }); |
| 22 | |
| 23 | export function Divider({ |
| 24 | xstyle, |
| 25 | }: { |
| 26 | xstyle?: stylex.StyleXStyles; |
| 27 | } & ReactProps<HTMLHRElement>) { |
| 28 | return <hr {...stylex.props(styles.hr, xstyle)} />; |
| 29 | } |
| 30 | |