playbook_ui_docs 13.34.1.pre.alpha.pbntr258paginationkitforreact3413 → 13.34.1.pre.alpha.play1447addrequiredicons3451

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.34.1.pre.alpha.pbntr258paginationkitforreact3413
4
+ version: 13.34.1.pre.alpha.play1447addrequiredicons3451
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-08-08 00:00:00.000000000 Z
12
+ date: 2024-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -1223,13 +1223,8 @@ files:
1223
1223
  - app/pb_kits/playbook/pb_overlay/docs/example.yml
1224
1224
  - app/pb_kits/playbook/pb_overlay/docs/index.js
1225
1225
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
1226
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx
1227
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md
1228
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx
1229
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md
1230
- - app/pb_kits/playbook/pb_pagination/docs/data.js
1226
+ - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.md
1231
1227
  - app/pb_kits/playbook/pb_pagination/docs/example.yml
1232
- - app/pb_kits/playbook/pb_pagination/docs/index.js
1233
1228
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.html.erb
1234
1229
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.jsx
1235
1230
  - app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.md
@@ -1,19 +0,0 @@
1
- import React from 'react'
2
-
3
- import Pagination from '../_pagination'
4
-
5
- const PaginationDefault = (props) => {
6
-
7
- return (
8
- <>
9
- <Pagination
10
- current={1}
11
- range={5}
12
- total={10}
13
- {...props}
14
- />
15
- </>
16
- )
17
- }
18
-
19
- export default PaginationDefault
@@ -1,62 +0,0 @@
1
- import React, { useState } from "react";
2
- import { Table, Pagination } from 'playbook-ui'
3
-
4
-
5
- import { data } from "./data";
6
-
7
- const PaginationPageChange = (props) => {
8
-
9
- const [activePage, setActivePage] = useState(1);
10
- const rowsPerPage = 3;
11
- const totalPages = Math.ceil(data.length / rowsPerPage);
12
-
13
- const onPageChange = (pageNumber) => {
14
- setActivePage(pageNumber);
15
- };
16
-
17
- const currentData = data.slice(
18
- (activePage - 1) * rowsPerPage,
19
- activePage * rowsPerPage
20
- );
21
-
22
-
23
- return (
24
- <div className="App">
25
- <Table
26
- marginBottom="xs"
27
- responsive="none"
28
- size="sm"
29
- {...props}
30
- >
31
- <Table.Head>
32
- <Table.Row>
33
- <Table.Header>{"Column 1"}</Table.Header>
34
- <Table.Header>{"Column 2"}</Table.Header>
35
- <Table.Header>{"Column 3"}</Table.Header>
36
- <Table.Header>{"Column 4"}</Table.Header>
37
- <Table.Header>{"Column 5"}</Table.Header>
38
- </Table.Row>
39
- </Table.Head>
40
- <Table.Body>
41
- {currentData.map((row, index) => (
42
- <Table.Row key={index}>
43
- {row.map((cell, cellIndex) => (
44
- <Table.Cell key={cellIndex}>{cell}</Table.Cell>
45
- ))}
46
- </Table.Row>
47
- ))}
48
- </Table.Body>
49
- </Table>
50
-
51
- <Pagination
52
- current={1}
53
- onChange={onPageChange}
54
- range={5}
55
- total={totalPages}
56
- {...props}
57
- />
58
- </div>
59
- )
60
- }
61
-
62
- export default PaginationPageChange
@@ -1 +0,0 @@
1
- You can use the `onPageChange` prop to control the data of your table. This prop is callback function that will allow you control the state.
@@ -1,23 +0,0 @@
1
- export const data = [
2
- ["Value 1", "Value 2", "Value 3", "Value 4", "Value 5"],
3
- ["Value 6", "Value 7", "Value 8", "Value 9", "Value 10"],
4
- ["Value 11", "Value 12", "Value 13", "Value 14", "Value 15"],
5
- ["Value 16", "Value 17", "Value 18", "Value 19", "Value 20"],
6
- ["Value 21", "Value 22", "Value 23", "Value 24", "Value 25"],
7
- ["Value 26", "Value 27", "Value 28", "Value 29", "Value 30"],
8
- ["Value 31", "Value 32", "Value 33", "Value 34", "Value 35"],
9
- ["Value 36", "Value 37", "Value 38", "Value 39", "Value 40"],
10
- ["Value 41", "Value 42", "Value 43", "Value 44", "Value 45"],
11
- ["Value 46", "Value 47", "Value 48", "Value 49", "Value 50"],
12
- ["Value 51", "Value 52", "Value 53", "Value 54", "Value 55"],
13
- ["Value 56", "Value 57", "Value 58", "Value 59", "Value 60"],
14
- ["Value 61", "Value 62", "Value 63", "Value 64", "Value 65"],
15
- ["Value 66", "Value 67", "Value 68", "Value 69", "Value 70"],
16
- ["Value 71", "Value 72", "Value 73", "Value 74", "Value 75"],
17
- ["Value 76", "Value 77", "Value 78", "Value 79", "Value 80"],
18
- ["Value 81", "Value 82", "Value 83", "Value 84", "Value 85"],
19
- ["Value 86", "Value 87", "Value 88", "Value 89", "Value 90"],
20
- ["Value 91", "Value 92", "Value 93", "Value 94", "Value 95"],
21
- ["Value 96", "Value 97", "Value 98", "Value 99", "Value 100"],
22
- ];
23
-
@@ -1,2 +0,0 @@
1
- export { default as PaginationDefault } from './_pagination_default.jsx'
2
- export { default as PaginationPageChange } from './_pagination_page_change.jsx'