dh_demo

DreamHanks demo project
git clone git://git.lair.cx/dh_demo
Log | Files | Refs | README

commit fb8f67d8efdaf5ade0806a1ef0bbbb3c3914e116
parent b871dc707efa9313ae4e7b18e614eccb05ee02df
Author: Yongbin Kim <iam@yongbin.kim>
Date:   Wed, 25 Jan 2023 16:26:35 +0900

feat: Divider 컴포넌트 추가

Signed-off-by: Yongbin Kim <iam@yongbin.kim>

Diffstat:
Acomponents/layout/Divider.module.css | 1+
Acomponents/layout/Divider.module.css.map | 2++
Acomponents/layout/Divider.module.scss | 14++++++++++++++
Acomponents/layout/Divider.tsx | 7+++++++
4 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/components/layout/Divider.module.css b/components/layout/Divider.module.css @@ -0,0 +1 @@ +.divider{height:1px;border:0;margin:4rem 0;background-color:#6f7975}@media(prefers-color-scheme: dark){.divider{background-color:#89938f}}/*# sourceMappingURL=Divider.module.css.map */ diff --git a/components/layout/Divider.module.css.map b/components/layout/Divider.module.css.map @@ -0,0 +1 @@ +{"version":3,"sourceRoot":"","sources":["Divider.module.scss","../../styles/core/_colors.scss"],"names":[],"mappings":"AAKA,SACE,WACA,SACA,OALO,OAQL,yBCqHF,mCD3HF,SAMI","file":"Divider.module.css"} +\ No newline at end of file diff --git a/components/layout/Divider.module.scss b/components/layout/Divider.module.scss @@ -0,0 +1,14 @@ +@use 'core/colors'; +@use 'core/vars'; + +$margin: (4 * vars.$gap) 0; + +.divider { + height: 1px; + border: 0; + margin: $margin; + + @include colors.apply-themes() using ($theme) { + background-color: colors.get($theme, 'outline'); + } +} diff --git a/components/layout/Divider.tsx b/components/layout/Divider.tsx @@ -0,0 +1,7 @@ +import styles from './Divider.module.css' + +export default function Divider () { + return ( + <hr className={styles['divider']} /> + ) +}