From 42ebc8c3e2754773d4b68ccf7e1ecb0c8eafe047 Mon Sep 17 00:00:00 2001 From: Akira Sudoh Date: Fri, 18 May 2018 23:55:16 +0900 Subject: [PATCH] fix(pagination): bring v2 version back (#782) --- src/components/pagination/pagination-v2.dust | 55 ------------------- .../pagination/pagination.config.js | 20 +++++++ src/components/pagination/pagination.hbs | 33 +++++++++-- 3 files changed, 47 insertions(+), 61 deletions(-) delete mode 100644 src/components/pagination/pagination-v2.dust create mode 100644 src/components/pagination/pagination.config.js diff --git a/src/components/pagination/pagination-v2.dust b/src/components/pagination/pagination-v2.dust deleted file mode 100644 index d0262f909f44..000000000000 --- a/src/components/pagination/pagination-v2.dust +++ /dev/null @@ -1,55 +0,0 @@ -{>_layout/} - -{ -
- Items per page: -
- - - - - -
- - - 1-10 of - 40 items -
-
- - 1 of - 4 pages - - -
- - - - - -
- -
- -{/content} diff --git a/src/components/pagination/pagination.config.js b/src/components/pagination/pagination.config.js new file mode 100644 index 000000000000..4ebc3dd720b3 --- /dev/null +++ b/src/components/pagination/pagination.config.js @@ -0,0 +1,20 @@ +'use stirct'; + +module.exports = { + variants: [ + { + name: 'default', + label: 'V1', + notes: ` + Pagination is used for splitting up content or data into several pages, with a control for navigating to the next or previous page. + `, + }, + { + name: 'v2', + label: 'V2', + context: { + version: 'v2', + }, + }, + ], +}; diff --git a/src/components/pagination/pagination.hbs b/src/components/pagination/pagination.hbs index d42514694af4..5e69e4c09c61 100644 --- a/src/components/pagination/pagination.hbs +++ b/src/components/pagination/pagination.hbs @@ -1,24 +1,29 @@
-
+
- Items per page  |   + {{#isnt version "v2"}} + Items per page  |   + {{/isnt}} + {{#is version "v2"}} + + {{/is}} 1-10 of 40 items
-
+
1 of 4 pages @@ -28,7 +33,23 @@ - + {{#isnt version "v2"}} + + {{else}} +
+ + + + + +
+ {{/isnt}}