-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (46 loc) · 1.09 KB
/
index.js
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import ReactDOM from 'react-dom';
import SingleSelect from './src';
const Puppy = (props) => {
return (
<div
style={{
minHeight: '10px',
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
paddingLeft: '10px',
}}
>
<img
style={{ height: '40px', width: '40px', marginRight: '10px' }}
src='https://images.unsplash.com/photo-1600369671738-fa3a43efeced?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80'
/>
<p>Puppy</p>
</div>
);
};
export default function App() {
const options = [
{ comp: Puppy },
'Apple',
'Banana',
'Cherry',
'Dates',
'Eggfruit',
];
return (
<div className='App' style={{ height: '100vh', padding: '20px' }}>
<h1>Hello CodeSandbox</h1>
<SingleSelect options={options} />
<h2>Start editing to see some magic happen!</h2>
</div>
);
}
const rootElement = document.getElementById('root');
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
rootElement,
);