Created
April 14, 2020 15:03
-
-
Save jsmanifest/eed618be46c0b4c0843494866e6f96d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App() { | |
const [collapsed, setCollapsed] = React.useState(true) | |
function toggle() { | |
setCollapsed((prevValue) => !prevValue) | |
} | |
const pediatricians = [ | |
'Michael Lopez', | |
'Sally Tran', | |
'Brian Lu', | |
'Troy Sakulbulwanthana', | |
'Lisa Wellington', | |
] | |
const psychiatrists = [ | |
'Miguel Rodriduez', | |
'Cassady Campbell', | |
'Mike Torrence', | |
] | |
const limit = 3 | |
function BeautifulListContainer({ children }) { | |
return ( | |
<div | |
style={{ | |
background: 'teal', | |
padding: 12, | |
borderRadius: 4, | |
color: '#fff', | |
}} | |
> | |
{children} | |
Today is: {new Date().toDateString()} | |
</div> | |
) | |
} | |
return ( | |
<div className="root"> | |
<div className="listContainer"> | |
<List | |
component={BeautifulListContainer} | |
collapsed={collapsed} | |
toggle={toggle} | |
header={null} | |
label="Bidders" | |
items={pediatricians} | |
limit={limit} | |
/> | |
</div> | |
<div className="listContainer"> | |
<List header="Bids on" label="Bidders" items={psychiatrists} /> | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment