Skip to content

Commit

Permalink
Merge pull request #305 from PrestaShopCorp/304-table-update-storybook
Browse files Browse the repository at this point in the history
fix: #304 update storybook
  • Loading branch information
mattgoud authored Jan 31, 2024
2 parents f466985 + 59c16ca commit 7015698
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 64 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"not op_mini all"
],
"peerDependencies": {
"vue": "^3.4.14"
"vue": "^3.2.0"
},
"dependencies": {
"@headlessui/vue": "^1.7.13",
Expand Down Expand Up @@ -108,7 +108,7 @@
"typescript": "^5.0.4",
"unplugin-vue-define-options": "^1.3.3",
"vitest": "^0.32.4",
"vue": "^3.4.14",
"vue": "^3.2.47",
"vue-router": "^4.1.6",
"vue-tsc": "^1.2.0"
}
Expand Down
31 changes: 21 additions & 10 deletions packages/components/table/stories/table.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,21 @@ export default {
import type { PuikTableHeader } from '@prestashopcorp/puik/es/components/table/src/table'
interface PuikTableHeader {
text: string | undefined
value: string
size: 'sm' | 'md' | 'lg' | undefined
width: string | undefined
align: 'left' | 'center' | 'right' | undefined
sortable: boolean | undefined
searchable: boolean | undefined
preventExpand: boolean | undefined
text?: string
size?: 'sm' | 'md' | 'lg'
align?: 'left' | 'center' | 'right'
width?: string
sortable?: boolean
preventExpand?: boolean
searchable?: boolean
searchSubmit?: boolean
searchType?: {$PuikTableSearchInputTypes}
}
enum PuikTableSearchInputTypes {
Text = 'text',
Range = 'range',
}
`,
},
Expand Down Expand Up @@ -216,8 +223,10 @@ export default {
description: 'Event emitted when sorting a column',
table: {
type: {
summary: 'sortOption',
summary: 'event => sortOption',
detail: `
// Payload type = sortOption
import type { sortOption } from '@prestashopcorp/puik/es/components/table/src/table'
type sortOption = {
Expand All @@ -233,9 +242,11 @@ type sortOption = {
control: 'none',
table: {
type: {
summary: 'event',
summary: 'event => SearchOption[]',
detail: `
Payload type = Array<SearchOption>
// Payload type = Array<SearchOption>
import type { searchOption } from '@prestashopcorp/puik/es/components/table/src/table'
type searchOption = {
searchBy: string;
Expand Down
2 changes: 1 addition & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.4.14"
"vue": "3.3.10"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.1.0",
Expand Down
Loading

0 comments on commit 7015698

Please sign in to comment.