Add our own list widget.
The material ui one is extremely inefficient and was causing noticeable delays.master
parent
08022994f2
commit
1a1bdc77af
@ -0,0 +1,14 @@
|
||||
.List {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ListItem {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.ListItem:hover {
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
import * as React from 'react';
|
||||
import { pure } from 'recompose';
|
||||
|
||||
import './List.css';
|
||||
|
||||
export const ListItem = pure((props: any) => (
|
||||
<li
|
||||
{...props}
|
||||
className="ListItem"
|
||||
>
|
||||
{props.children}
|
||||
</li>
|
||||
));
|
||||
|
||||
export const List = pure((props: { children: React.ReactNode[] | React.ReactNode }) => (
|
||||
<ul className="List">
|
||||
{props.children}
|
||||
</ul>
|
||||
));
|
Loading…
Reference in New Issue