File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
packages/components/all/src/divider Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+ import styles from "./styles/index.module.scss" ;
3+ import classNames from "classnames" ;
4+
5+ export interface DividerProps extends React . HTMLAttributes < HTMLHRElement > {
6+ type ?: "vertical" | "horizontal" ;
7+ }
8+
9+ export const Divider = ( {
10+ type = "horizontal" ,
11+ className,
12+ ...otherProps
13+ } : Readonly < DividerProps > ) : React . ReactElement => (
14+ < hr className = { classNames ( styles . root , styles [ type ] , className ) } { ...otherProps } />
15+ ) ;
Original file line number Diff line number Diff line change 1+ @import " @rck/theme" ;
2+
3+ .root {
4+ background-color : get-color (" neutral200" );
5+ border : none ;
6+ height : var (--height );
7+ width : var (--width );
8+ }
9+
10+ .horizontal {
11+ --width : 100% ;
12+ --height : 1px ;
13+ }
14+
15+ .vertical {
16+ --width : 1px ;
17+ --height : 100% ;
18+ }
You can’t perform that action at this time.
0 commit comments