import React from
'react'
import
'rsuite/dist/styles/rsuite-default.css'
;
import { Table } from
'rsuite'
;
const { Column, HeaderCell, Cell } = Table;
export
default
function
App() {
const sampleData = [
{ firstName:
'Gourav'
, lastName:
'Hammad'
, city:
'Mhow'
},
{ firstName:
'Rithik'
, lastName:
'Verma'
, city:
'Indore'
},
{ firstName:
'Kartik'
, lastName:
'Malik'
, city:
'Raipur'
},
{ firstName:
'Nikhil'
, lastName:
'Kapoor'
, city:
'Rau'
},
{ firstName:
'Ayush'
, lastName:
'Singh'
, city:
'Dewas'
}
]
return
(
<div style={{
display:
'block'
, width: 700, paddingLeft: 30
}}>
<h4>React Suite Table Component</h4>
<Table
height={500}
data={sampleData}
>
<Column width={200}>
<HeaderCell>First Name</HeaderCell>
<Cell dataKey=
"firstName"
/>
</Column>
<Column width={200}>
<HeaderCell>Last Name</HeaderCell>
<Cell dataKey=
"lastName"
/>
</Column>
<Column width={200}>
<HeaderCell>City</HeaderCell>
<Cell dataKey=
"city"
/>
</Column>
</Table>
</div>
);
}