aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/atoms')
-rw-r--r--src/components/atoms/lists/list.module.scss10
-rw-r--r--src/components/atoms/lists/list.tsx12
2 files changed, 2 insertions, 20 deletions
diff --git a/src/components/atoms/lists/list.module.scss b/src/components/atoms/lists/list.module.scss
index f647072..95f9b40 100644
--- a/src/components/atoms/lists/list.module.scss
+++ b/src/components/atoms/lists/list.module.scss
@@ -7,10 +7,6 @@
color: var(--color-primary-dark);
}
- & & {
- margin-top: var(--spacing-2xs);
- }
-
&--ordered {
padding: 0;
counter-reset: li;
@@ -33,12 +29,6 @@
padding: 0 0 0 var(--spacing-sm);
}
- &--has-margin &__item {
- &:not(:last-child) {
- margin-bottom: var(--spacing-2xs);
- }
- }
-
&--flex {
@extend %reset-list;
diff --git a/src/components/atoms/lists/list.tsx b/src/components/atoms/lists/list.tsx
index 711ade1..aa0a241 100644
--- a/src/components/atoms/lists/list.tsx
+++ b/src/components/atoms/lists/list.tsx
@@ -33,10 +33,6 @@ export type ListProps = {
* The list kind.
*/
kind?: 'ordered' | 'unordered' | 'flex';
- /**
- * Set margin between list items. Default: true.
- */
- withMargin?: boolean;
};
/**
@@ -49,11 +45,9 @@ const List: FC<ListProps> = ({
items,
itemsClassName = '',
kind = 'unordered',
- withMargin = true,
}) => {
const ListTag = kind === 'ordered' ? 'ol' : 'ul';
const kindClass = `list--${kind}`;
- const marginClass = withMargin ? 'list--has-margin' : 'list--no-margin';
/**
* Retrieve the list items.
@@ -66,7 +60,7 @@ const List: FC<ListProps> = ({
{value}
{child && (
<ListTag
- className={`${styles.list} ${styles[kindClass]} ${styles[marginClass]} ${className}`}
+ className={`${styles.list} ${styles[kindClass]} ${className}`}
>
{getItems(child)}
</ListTag>
@@ -76,9 +70,7 @@ const List: FC<ListProps> = ({
};
return (
- <ListTag
- className={`${styles.list} ${styles[kindClass]} ${styles[marginClass]} ${className}`}
- >
+ <ListTag className={`${styles.list} ${styles[kindClass]} ${className}`}>
{getItems(items)}
</ListTag>
);