
| Current Path : /var/www/html/c12park/vendor/twbs/bootstrap/site/src/components/shortcodes/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/c12park/vendor/twbs/bootstrap/site/src/components/shortcodes/Table.astro |
---
import Code from '@shortcodes/Code.astro'
import Example from '@shortcodes/Example.astro'
import * as tableContent from '@shortcodes/TableContent.md'
interface Props {
/**
* Any class(es) to be added to the `<table>` element (both in the example and code snippet).
*/
class?: string
/**
* Show a simplified version in the example code snippet by replacing the table content inside `<table>` & `</table>`
* with `...`.
* @default true
*/
simplified?: boolean
}
const { class: className, simplified = true } = Astro.props
const tableCode = `<table${className ? ` class="${className}"` : ''}>
${simplified ? ' ...' : await tableContent.compiledContent()}
</table>`
const exampleCode = `<table${className ? ` class="${className}"` : ''}>
${await tableContent.compiledContent()}
</table>`
---
<Example showMarkup={false} code={exampleCode} />
<Code code={tableCode} lang="html" />