refactor: update examples
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
<template>
|
||||
<div class="example">
|
||||
<CNav variant="tabs">
|
||||
<CNav variant="underline-border">
|
||||
<CNavItem>
|
||||
<CNavLink href="#" active>
|
||||
<CIcon icon="cil-media-play" class="me-2" />
|
||||
Preview
|
||||
</CNavLink>
|
||||
</CNavItem>
|
||||
<CNavItem>
|
||||
@@ -13,7 +14,7 @@
|
||||
</CNavLink>
|
||||
</CNavItem>
|
||||
</CNav>
|
||||
<CTabContent class="rounded-bottom">
|
||||
<CTabContent :class="['rounded-bottom', addClass]">
|
||||
<CTabPane class="p-3 preview" visible>
|
||||
<slot></slot>
|
||||
</CTabPane>
|
||||
@@ -25,16 +26,15 @@
|
||||
export default {
|
||||
name: 'DocsExample',
|
||||
props: {
|
||||
href: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
required: false,
|
||||
},
|
||||
href: String,
|
||||
tabContentClass: String,
|
||||
},
|
||||
setup(props) {
|
||||
const url = `https://coreui.io/vue/docs/${props.href}`
|
||||
const addClass = props.tabContentClass
|
||||
|
||||
return {
|
||||
addClass,
|
||||
url,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
background-color: var(--#{$prefix}tertiary-bg) !important;
|
||||
background-color: var(--#{$prefix}tertiary-bg);
|
||||
}
|
||||
|
||||
& + p {
|
||||
@@ -51,6 +51,9 @@
|
||||
}
|
||||
|
||||
// Buttons
|
||||
.col > .btn,
|
||||
.col-auto > .btn,
|
||||
.d-md-block > .btn,
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
margin: .25rem .125rem;
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
</CTable>
|
||||
</DocsExample>
|
||||
<p class="text-body-secondary small">
|
||||
<a href="https://coreui.io/docs/4.0/utilities/borders#border-color">
|
||||
<a href="https://coreui.io/docs/utilities/borders#border-color">
|
||||
Border color utilities
|
||||
</a>
|
||||
can be added to change colors:
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<CCardBody>
|
||||
<p class="text-body-secondary small">
|
||||
You can combine button with our
|
||||
<a href="https://icons.coreui.io/">CoreUI Icons</a>.
|
||||
<a href="https://coreui.io/icons/">CoreUI Icons</a>.
|
||||
</p>
|
||||
<DocsExample href="components/button.html">
|
||||
<template
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<strong>required</strong> contextual <code>color</code> props (e.g.,
|
||||
<code>primary</code>). For inline dismissal, use the
|
||||
<a
|
||||
href="https://coreui.io/vue/docs/4.0/components/alert.html#dismissing"
|
||||
href="https://coreui.io/vue/docs/components/alert.html#dismissing"
|
||||
>
|
||||
dismissing prop
|
||||
</a>
|
||||
|
||||
@@ -133,11 +133,11 @@
|
||||
<CCardBody>
|
||||
<p class="text-body-secondary small">
|
||||
Customize your toasts by removing sub-components, tweaking them with
|
||||
<a href="https://coreui.io/docs/4.0/utilities/api">utilities</a>, or by adding your own
|
||||
<a href="https://coreui.io/docs/utilities/api">utilities</a>, or by adding your own
|
||||
markup. Here we've created a simpler toast by removing the default
|
||||
<code><CToastHeader></code>, adding a custom hide icon from
|
||||
<a href="https://icons.coreui.io">CoreUI Icons</a>, and using some
|
||||
<a href="https://coreui.io/docs/4.0/utilities/flex">flexbox utilities</a> to adjust the
|
||||
<a href="https://coreui.io/icons/">CoreUI Icons</a>, and using some
|
||||
<a href="https://coreui.io/docs/utilities/flex">flexbox utilities</a> to adjust the
|
||||
layout.
|
||||
</p>
|
||||
<DocsExample href="components/toast.html#custom-content">
|
||||
@@ -173,8 +173,8 @@
|
||||
<CCardBody>
|
||||
<p class="text-body-secondary small">
|
||||
Building on the above example, you can create different toast color schemes with our
|
||||
<a href="https://coreui.io/docs/4.0/utilities/colors">color</a> and
|
||||
<a href="https://coreui.io/docs/4.0//utilities/background">background</a> utilities.
|
||||
<a href="https://coreui.io/docs/utilities/colors">color</a> and
|
||||
<a href="https://coreui.io/docs//utilities/background">background</a> utilities.
|
||||
Here we've set <code>color="primary"</code> and added
|
||||
<code>.text-white</code> class to the <code><Ctoast></code>, and then set
|
||||
<code>white</code> property to our close button. For a crisp edge, we remove the default
|
||||
|
||||
Reference in New Issue
Block a user