Skip to content

Commit

Permalink
docs(BTableSimple): fill out component reference
Browse files Browse the repository at this point in the history
  • Loading branch information
dwgray committed Jan 8, 2025
1 parent 998359b commit 309d10a
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions apps/docs/src/data/components/table.data.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,73 @@
import type {BvnComponentProps} from 'bootstrap-vue-next'
import {type ComponentReference, type PropertyReference, StyleKind} from '../../types'
import {buildCommonProps, pick} from '../../utils'

export default {
load: (): ComponentReference[] => {
const BTableSimpleProps = {
bordered: {
type: 'boolean',
default: false,
description: 'Adds borders to all the cells and headers',
},
borderless: {
type: 'boolean',
default: false,
description: 'Removes all borders from cells',
},
borderVariant: {
type: 'ColorVariant | null',
default: null,
description: 'Applies one of the Bootstrap theme color variants to the table border',
},
captionTop: {
type: 'boolean',
default: false,
description: 'When set, the table caption will appear above the table',
},
dark: {
type: 'boolean',
default: false,
description: 'Places the table in dark mode',
},
fixed: {
type: 'boolean',
default: false,
description:
'Makes all columns equal width (fixed layout table). Will speed up rendering for large tables. Column widths can be set via CSS or colgroup',
},
hover: {
type: 'boolean',
default: false,
},
id: {
type: 'string',
default: undefined,
description: 'Enables hover styling on rows',
},
noBorderCollapse: {
type: 'boolean',
default: false,
description:
"Disable's the collapsing of table borders. Useful when table has sticky headers or columns",
},
outlined: {
type: 'boolean',
default: false,
description: 'Adds an outline border to the table element',
},
responsive: {
type: 'boolean | Breakpoint',
default: false,
description:
"Makes the table responsive in width, adding a horizontal scrollbar. Set to true for always responsive or set to one of the breakpoints to switch from responsive to normal: 'sm', 'md', 'lg', 'xl'",
},
small: {
type: 'boolean',
default: false,
description: 'Renders the table with smaller cell padding',
},
stacked: {
type: 'boolean | Breakpoint',
default: false,
description:
"Place the table in stacked mode. Set to true for always stacked, or set to one of the breakpoints to switch from stacked to normal: 'sm', 'md', 'lg', 'xl'",
},
stickyHeader: {
type: 'boolean | Numberish',
Expand All @@ -65,23 +78,24 @@ export default {
striped: {
type: 'boolean',
default: false,
description: 'Applies striping to the tbody rows',
},
stripedColumns: {
type: 'boolean',
default: false,
description: 'Applies striping to the table columns',
},
tableAttrs: {
type: 'AttrsValue',
default: undefined,
description: 'Attributes to apply to the table element',
},
tableClass: {
type: 'ClassValue',
default: undefined,
description: 'Classes to apply to the table element',
},
variant: {
type: 'ColorVariant | null',
default: null,
},
...pick(buildCommonProps(buildCommonProps()), ['id', 'variant']),
} as const satisfies Record<keyof BvnComponentProps['BTableSimple'], PropertyReference>

const BTableLiteProps = {
Expand Down Expand Up @@ -555,9 +569,8 @@ export default {
emits: [],
slots: [
{
description: '',
name: 'default',
scope: [],
description: 'Content to place in the table',
},
],
},
Expand Down

0 comments on commit 309d10a

Please sign in to comment.