{"size": 675, "ext": "js", "max_stars_repo_path": "examples/demos/example01-basic.js", "max_stars_repo_name": "Vooban/react-data-grid", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "examples/demos/example01-basic.js", "max_issues_repo_name": "Vooban/react-data-grid", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "examples/demos/example01-basic.js", "max_forks_repo_name": "Vooban/react-data-grid", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.9615384615, "max_line_length": 125, "alphanum_fraction": 0.5851851852}
import React from 'react';
import DataGrid, { valueCellContentRenderer } from '@vooban/react-data-grid';
import Wrapper from './Wrapper';

const columns = [
  { key: 'id', name: 'ID' },
  { key: 'title', name: 'Title' },
  { key: 'count', name: 'Count' }
];

const rows = [{ id: 0, title: 'row1', count: 20 }, { id: 1, title: 'row1', count: 40 }, { id: 2, title: 'row1', count: 60 }];

export default function() {
  return (
    <Wrapper title="Basic Example">
      <DataGrid
        columns={columns}
        rowGetter={i => rows[i]}
        rowsCount={3}
        minHeight={150}
        defaultCellContentRenderer={valueCellContentRenderer}
      />
    </Wrapper>
  );
}
