generated from abelflopes/lerna-monorepo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f474827
commit c95c7c1
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import styles from "./styles/index.module.scss"; | ||
import classNames from "classnames"; | ||
|
||
export interface DividerProps extends React.HTMLAttributes<HTMLHRElement> { | ||
type?: "vertical" | "horizontal"; | ||
} | ||
|
||
export const Divider = ({ | ||
type = "horizontal", | ||
className, | ||
...otherProps | ||
}: Readonly<DividerProps>): React.ReactElement => ( | ||
<hr className={classNames(styles.root, styles[type], className)} {...otherProps} /> | ||
); |
18 changes: 18 additions & 0 deletions
18
packages/components/all/src/divider/styles/index.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@import "@rck/theme"; | ||
|
||
.root { | ||
background-color: get-color("neutral200"); | ||
border: none; | ||
height: var(--height); | ||
width: var(--width); | ||
} | ||
|
||
.horizontal { | ||
--width: 100%; | ||
--height: 1px; | ||
} | ||
|
||
.vertical { | ||
--width: 1px; | ||
--height: 100%; | ||
} |