Sha256: 18b93bb34c4e9f0ea40fb334f96bbd51b89abaa9f94c8ef494b7fadd255423ee
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
import React from "react" import { AdvancedTable, Pill, Body } from "playbook-ui" import MOCK_DATA from "./advanced_table_mock_data.json" const AdvancedTableCustomCell = (props) => { const columnDefinitions = [ { accessor: "year", label: "Year", cellAccessors: ["quarter", "month", "day"], }, { accessor: "newEnrollments", label: "New Enrollments", customRenderer: (row, value) => <Pill text={value} />, }, { accessor: "scheduledMeetings", label: "Scheduled Meetings", customRenderer: (row, value) => <Body><a href="#">{value}</a></Body>, }, { accessor: "attendanceRate", label: "Attendance Rate", }, { accessor: "completedClasses", label: "Completed Classes", }, { accessor: "classCompletionRate", label: "Class Completion Rate", }, { accessor: "graduatedStudents", label: "Graduated Students", }, ] return ( <div> <AdvancedTable columnDefinitions={columnDefinitions} tableData={MOCK_DATA} {...props} /> </div> ) } export default AdvancedTableCustomCell
Version data entries
2 entries across 2 versions & 2 rubygems