-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Test ajout pagination tableau
- Loading branch information
1 parent
8252799
commit dff1da4
Showing
2 changed files
with
246 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,10 @@ export default { | |
control: 'boolean', | ||
description: 'Indique si la balise caption doit être visible (`false`, défaut) ou cachée (`true`)', | ||
}, | ||
pagination: { | ||
control: 'boolean', | ||
description: 'Intègre une pagination au tableau', | ||
}, | ||
headers: { | ||
control: 'object', | ||
description: 'Liste des en-têtes du tableau (tableau de string). Il existe un slot nommé `headers` pour gérer les en-têtes avec d’autres composants. C’est la même props attendue par <a href="/?path=/docs/composants-tableau-en-t%C3%AAtes-de-tableau-dsfrtableheaders--en-tetes-de-tableau">DsfrTableHeaders</a>', | ||
|
@@ -49,9 +53,9 @@ const rows = [ | |
[ | ||
'EGAUD', | ||
'Pierre-Louis', | ||
'pierre.egaud@ninja.com', | ||
'01 02 03 04 05', | ||
'06 01 02 03 04', | ||
'pierre.egaud@castor.com', | ||
'02 04 06 08 10', | ||
'06 05 04 03 02', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
|
@@ -66,9 +70,9 @@ const rows = [ | |
rowData: [ | ||
'DEBROIZE', | ||
'Clément', | ||
'clement.debroize@ninja.com', | ||
'01 02 03 04 05', | ||
'06 01 02 03 04', | ||
'clement.debroize@exile.com', | ||
'02 44 66 55 99', | ||
'07 88 77 22 33', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Succès', | ||
|
@@ -81,21 +85,166 @@ const rows = [ | |
'Stan', | ||
'[email protected]', | ||
{ | ||
text: '01 02 03 04 05', | ||
text: '02 77 00 00 77', | ||
cellAttrs: { | ||
class: 'pointer', | ||
onClick: () => {}, // eslint-disable-line @typescript-eslint/no-empty-function | ||
}, | ||
}, | ||
'06 01 02 03 04', | ||
'06 08 07 09 08', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Info', | ||
class: 'info', | ||
}, | ||
], | ||
[ | ||
'MONTANA', | ||
'Tony', | ||
'[email protected]', | ||
'02 07 03 19 84', | ||
'06 07 03 19 84', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
class: 'error', | ||
}, | ||
], | ||
[ | ||
'BOND', | ||
'James', | ||
'[email protected]', | ||
'02 00 07 19 62', | ||
'06 00 07 19 62', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Succès', | ||
class: 'success', | ||
}, | ||
], | ||
[ | ||
'RAMBO', | ||
'John', | ||
'[email protected]', | ||
'02 00 00 19 82', | ||
'06 00 00 19 82', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Info', | ||
class: 'info', | ||
}, | ||
], | ||
[ | ||
'CONNOR', | ||
'Sarah', | ||
'[email protected]', | ||
'02 00 00 19 84', | ||
'06 00 00 19 84', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
class: 'error', | ||
}, | ||
], | ||
[ | ||
'KENOBI', | ||
'Obiwan', | ||
'[email protected]', | ||
'02 00 00 19 77', | ||
'06 00 00 19 77', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Succès', | ||
class: 'success', | ||
}, | ||
], | ||
[ | ||
'KRUEGER', | ||
'Freddy', | ||
'[email protected]', | ||
'02 00 00 19 84', | ||
'06 00 00 19 84', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Info', | ||
class: 'info', | ||
}, | ||
], | ||
[ | ||
'LEGRIS', | ||
'Gandalf', | ||
'[email protected]', | ||
'02 00 00 20 01', | ||
'06 00 00 20 01', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
class: 'error', | ||
}, | ||
], | ||
[ | ||
'SÖZE', | ||
'Keyser', | ||
'[email protected]', | ||
'02 00 00 19 95', | ||
'06 00 00 19 95', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Info', | ||
class: 'info', | ||
}, | ||
], | ||
[ | ||
'HUNT', | ||
'Ethan', | ||
'[email protected]', | ||
'02 00 00 19 96', | ||
'06 00 00 19 96', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
class: 'error', | ||
}, | ||
], | ||
[ | ||
'HOLMES', | ||
'Sherlock', | ||
'[email protected]', | ||
'02 00 00 18 87', | ||
'06 00 00 18 87', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Succès', | ||
class: 'success', | ||
}, | ||
], | ||
[ | ||
'JONES', | ||
'Indiana', | ||
'[email protected]', | ||
'02 00 00 19 81', | ||
'06 00 00 19 81', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Info', | ||
class: 'info', | ||
}, | ||
], | ||
[ | ||
'WAYNE', | ||
'Bruce', | ||
'[email protected]', | ||
'02 00 00 19 89', | ||
'06 00 00 19 89', | ||
{ | ||
component: 'DsfrTag', | ||
label: 'Erreur', | ||
class: 'error', | ||
}, | ||
], | ||
] | ||
const noCaption = false | ||
const pagination = true | ||
|
||
export const TableauEntier = (args) => ({ | ||
components: { | ||
|
@@ -120,6 +269,7 @@ export const TableauEntier = (args) => ({ | |
:headers="headers" | ||
:rows="rows" | ||
:no-caption="noCaption" | ||
:pagination="pagination" | ||
/> | ||
`, | ||
|
||
|
@@ -129,4 +279,5 @@ TableauEntier.args = { | |
headers, | ||
rows, | ||
noCaption, | ||
pagination, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters