-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathList.tsx
33 lines (26 loc) · 899 Bytes
/
List.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import React, {Fragment} from 'react';
import {YFMWrapper} from '../../../../components';
import {PriceDetailsListProps, TextSize} from '../../../../models';
import {block} from '../../../../utils';
import './List.scss';
const b = block('marked-list');
export interface ListProps {
items: PriceDetailsListProps[];
titleSize?: TextSize;
}
const List = (props: ListProps) => {
const {items = [], titleSize = 's'} = props;
return (
<Fragment>
{items.map((item, id) => (
<div key={id} className={b('list-item')}>
<img className={b('img')} alt="" />
<div className={b('text', {size: titleSize})}>
<YFMWrapper content={item.text} modifiers={{constructor: true}} />
</div>
</div>
))}
</Fragment>
);
};
export default List;