@sats-group/ui-lib 75.6.0 → 75.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -71,7 +71,11 @@
|
|
|
71
71
|
border-top: 1px solid light.$ge-divider-default;
|
|
72
72
|
display: grid;
|
|
73
73
|
gap: spacing.$m;
|
|
74
|
-
padding: 20px;
|
|
74
|
+
padding: 20px;
|
|
75
|
+
|
|
76
|
+
&--list {
|
|
77
|
+
padding: 0;
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
@media (min-resolution: 2dppx) {
|
|
77
81
|
border-bottom-width: 0.5px;
|
|
@@ -5,7 +5,7 @@ import ArrowDown from '../icons/24/arrow-down';
|
|
|
5
5
|
import LinkButton from '../link-button';
|
|
6
6
|
import Text from '../text';
|
|
7
7
|
|
|
8
|
-
import type
|
|
8
|
+
import { type Expander as Props } from './expander.types';
|
|
9
9
|
import Badge from '../badge';
|
|
10
10
|
import { Types } from '../badge/badge.types';
|
|
11
11
|
import Link from '../link';
|
|
@@ -15,6 +15,7 @@ const ExpanderListItem: React.FC<
|
|
|
15
15
|
React.PropsWithChildren<Props<unknown>['items'][number]['listItemProps']>
|
|
16
16
|
> = ({
|
|
17
17
|
actions,
|
|
18
|
+
contentType = 'article',
|
|
18
19
|
defaultOpen = false,
|
|
19
20
|
faq,
|
|
20
21
|
icon,
|
|
@@ -74,7 +75,9 @@ const ExpanderListItem: React.FC<
|
|
|
74
75
|
>
|
|
75
76
|
<Collapse isOpen={isOpen}>
|
|
76
77
|
<div
|
|
77
|
-
className=
|
|
78
|
+
className={cn('expander__content', {
|
|
79
|
+
[`expander__content--${contentType}`]: contentType,
|
|
80
|
+
})}
|
|
78
81
|
itemScope={faq ? faq : undefined}
|
|
79
82
|
itemProp={faq ? 'acceptedAnswer' : undefined}
|
|
80
83
|
itemType={faq ? 'https://schema.org/Answer' : undefined}
|
|
@@ -2,9 +2,16 @@ import type { ReactNode } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import type { Link } from '../link/link.types';
|
|
4
4
|
import type { LinkButton } from '../link-button/link-button.types';
|
|
5
|
+
import { ObjectValues } from '../types';
|
|
6
|
+
|
|
7
|
+
export const contentTypes = {
|
|
8
|
+
article: 'article',
|
|
9
|
+
list: 'list',
|
|
10
|
+
} as const;
|
|
5
11
|
|
|
6
12
|
type ExpanderListItem = {
|
|
7
13
|
actions: LinkButton[];
|
|
14
|
+
contentType?: ObjectValues<typeof contentTypes>;
|
|
8
15
|
defaultOpen?: boolean;
|
|
9
16
|
faq?: boolean;
|
|
10
17
|
icon?: ReactNode;
|