addons/components/Divider.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 {ReactProps} from './utils';
b69ab319
b69ab3110import * as stylex from '@stylexjs/stylex';
b69ab3111
b69ab3112const styles = stylex.create({
b69ab3113 hr: {
b69ab3114 margin: '4px 0',
b69ab3115 border: 'none',
b69ab3116 borderTop: '1px solid var(--divider-background)',
b69ab3117 outline: 'none',
b69ab3118 height: 0,
b69ab3119 width: '100%',
b69ab3120 },
b69ab3121});
b69ab3122
b69ab3123export function Divider({
b69ab3124 xstyle,
b69ab3125}: {
b69ab3126 xstyle?: stylex.StyleXStyles;
b69ab3127} & ReactProps<HTMLHRElement>) {
b69ab3128 return <hr {...stylex.props(styles.hr, xstyle)} />;
b69ab3129}