From ba793e043e4d8515b1a9ea490ee2c5f92b1fd6c2 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Wed, 27 Sep 2023 15:40:16 +0200 Subject: refactor(components): rewrite Section component * Make it compliant with ESlint rules * Remove mandatory heading, it now depends on the consumer * Change defaults for hasBorder and variant --- .../atoms/layout/section/section.module.scss | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/components/atoms/layout/section/section.module.scss (limited to 'src/components/atoms/layout/section/section.module.scss') diff --git a/src/components/atoms/layout/section/section.module.scss b/src/components/atoms/layout/section/section.module.scss new file mode 100644 index 0000000..771b8e3 --- /dev/null +++ b/src/components/atoms/layout/section/section.module.scss @@ -0,0 +1,25 @@ +@use "../../../../styles/abstracts/functions" as fun; +@use "../../../../styles/abstracts/placeholders"; + +.wrapper { + @extend %grid; + + row-gap: var(--spacing-sm); + padding: var(--spacing-md) 0; + + &--borders { + border-bottom: fun.convert-px(1) solid var(--color-border); + } + + &--dark { + background: var(--color-bg-secondary); + } + + &--light { + background: var(--color-bg); + } + + > * { + grid-column: 2; + } +} -- cgit v1.2.3