colouring-montreal/app/src/frontend/components/list-wrapper.tsx
Maciej Ziarkowski 3a0c852088
Refactor and restyle UI (#645)
Tweaks to visual output and code organisation related to styles of:

- sidebar (category grid, data view/edit, section headers and action buttons)
- header/menu
- map controls (search box)
- layout (sidebar, menu, header sizes)
2020-12-27 23:51:32 +00:00

23 lines
504 B
TypeScript

import React from 'react';
interface ListWrapperProps {
listType?: 'ul' | 'ol';
className?: string;
elementClassName?: string;
}
export const ListWrapper: React.FC<ListWrapperProps> = (props) => {
const ListTag=props.listType ?? 'ol';
return (
<ListTag className={props.className}>
{
React.Children.map(props.children, (elem) => (
<li className={props.elementClassName}>
{elem}
</li>
))
}
</ListTag>);
};