mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
start adding response parsing & ui elements
This commit is contained in:
32
hyperglass/ui/components/Table/TableSelectShow.js
Normal file
32
hyperglass/ui/components/Table/TableSelectShow.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import * as React from "react";
|
||||
import { Select } from "@chakra-ui/core";
|
||||
|
||||
{
|
||||
/* <select
|
||||
value={pageSize}
|
||||
onChange={e => {setPageSize(Number(e.target.value))}}
|
||||
>
|
||||
{[5, 10, 20, 30, 40, 50].map(pageSize => (
|
||||
<option key={pageSize} value={pageSize}>
|
||||
Show {pageSize}
|
||||
</option>
|
||||
))}
|
||||
</select> */
|
||||
}
|
||||
|
||||
const TableSelectShow = ({ value, onChange, children, ...props }) => {
|
||||
return (
|
||||
<Select onChange={onChange} {...props}>
|
||||
{[5, 10, 20, 30, 40, 50].map(value => (
|
||||
<option key={value} value={value}>
|
||||
Show {value}
|
||||
</option>
|
||||
))}
|
||||
{children}
|
||||
</Select>
|
||||
);
|
||||
};
|
||||
|
||||
TableSelectShow.displayName = "TableSelectShow";
|
||||
|
||||
export default TableSelectShow;
|
Reference in New Issue
Block a user