mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-19 11:51:23 +02:00
Fix StackBlitz Popovers and Tooltips examples (#36449)
* Fix StackBlitz Popovers and Tooltips examples * Rename shortcode example parameters * Reorder example shortcode doc params + fix Cspell * Remove 'stackblitz' param + use data-bs-title instead of title * Update site/layouts/partials/callout-warning-data-bs-title-vs-title.md Co-authored-by: Mark Otto <markd.otto@gmail.com> Co-authored-by: Mark Otto <markd.otto@gmail.com>
This commit is contained in:
@@ -4,17 +4,18 @@
|
||||
`args` are all optional and can be one of the following:
|
||||
* id: the `div`'s id - default: ""
|
||||
* class: any extra class(es) to be added to the `div` - default: ""
|
||||
* js_snippet: add extra JS snippet to StackBlitz - default: `false`
|
||||
* show_preview: if the preview should be output in the HTML - default: `true`
|
||||
* lang: language used to display the code - default: "html"
|
||||
* show_markup: if the markup should be output in the HTML - default: `true`
|
||||
* show_preview: if the preview should be output in the HTML - default: `true`
|
||||
* stackblitz_add_js: if extra JS snippet shoud le added to StackBlitz - default: `false`
|
||||
*/ -}}
|
||||
|
||||
{{- $id := .Get "id" -}}
|
||||
{{- $class := .Get "class" -}}
|
||||
{{- $lang := .Get "lang" | default "html" -}}
|
||||
{{- $show_preview := .Get "show_preview" | default true -}}
|
||||
{{- $stackblitz_add_js := .Get "stackblitz_add_js" | default false -}}
|
||||
{{- $show_markup := .Get "show_markup" | default true -}}
|
||||
{{- $js_snippet := .Get "js_snippet" | default false -}}
|
||||
{{- $show_preview := .Get "show_preview" | default true -}}
|
||||
{{- $input := .Inner -}}
|
||||
|
||||
<div class="bd-example-snippet bd-code-snippet">
|
||||
@@ -29,7 +30,7 @@
|
||||
<div class="d-flex align-items-center highlight-toolbar bg-light ps-3 pe-2 py-1">
|
||||
<small class="font-monospace text-muted text-uppercase">{{- $lang -}}</small>
|
||||
<div class="d-flex ms-auto">
|
||||
<button type="button" class="btn-edit text-nowrap"{{ with $js_snippet }} data-js-snippet="{{ $js_snippet }}"{{ end }} title="Try it on StackBlitz">
|
||||
<button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
|
||||
<svg class="bi" role="img" aria-label="Try it"><use xlink:href="#lightning-charge-fill"/></svg>
|
||||
</button>
|
||||
<button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
|
||||
|
Reference in New Issue
Block a user