add separator thickness
This commit is contained in:
parent
b3d8dfae5e
commit
bd8c509151
@ -1,7 +1,7 @@
|
||||
import classNames from "classnames";
|
||||
import React from "react";
|
||||
|
||||
import classes from "./classes.module.scss";
|
||||
import classNames from "classnames";
|
||||
|
||||
export enum ESeperatorColor {
|
||||
LIGHT = "light",
|
||||
@ -19,15 +19,16 @@ type IProps = {
|
||||
color?: ESeperatorColor;
|
||||
direction?: ESeperatorDirection;
|
||||
size?: number;
|
||||
thickness?: number;
|
||||
};
|
||||
|
||||
export default function Separator(props: IProps) {
|
||||
const { color = ESeperatorColor.DEFAULT, direction = ESeperatorDirection.HORIZONTAL, size } = props;
|
||||
const { color = ESeperatorColor.DEFAULT, direction = ESeperatorDirection.HORIZONTAL, size, thickness = 1 } = props;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(classes["root"], classes[color], classes[direction])}
|
||||
style={direction === ESeperatorDirection.HORIZONTAL ? { width: size } : { height: size }}
|
||||
style={direction === ESeperatorDirection.HORIZONTAL ? { width: size, height: thickness } : { height: size, width: thickness }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user