Skip to content

Commit 0eb3fcd

Browse files
committed
refactor: update examples
1 parent 3e9b26d commit 0eb3fcd

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

src/components/DocsExample.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<template>
22
<div class="example">
3-
<CNav variant="tabs">
3+
<CNav variant="underline-border">
44
<CNavItem>
55
<CNavLink href="#" active>
66
<CIcon icon="cil-media-play" class="me-2" />
7+
Preview
78
</CNavLink>
89
</CNavItem>
910
<CNavItem>
@@ -13,7 +14,7 @@
1314
</CNavLink>
1415
</CNavItem>
1516
</CNav>
16-
<CTabContent class="rounded-bottom">
17+
<CTabContent :class="['rounded-bottom', addClass]">
1718
<CTabPane class="p-3 preview" visible>
1819
<slot></slot>
1920
</CTabPane>
@@ -25,16 +26,15 @@
2526
export default {
2627
name: 'DocsExample',
2728
props: {
28-
href: {
29-
type: String,
30-
default: undefined,
31-
required: false,
32-
},
29+
href: String,
30+
tabContentClass: String,
3331
},
3432
setup(props) {
3533
const url = `https://coreui.io/vue/docs/${props.href}`
36-
34+
const addClass = props.tabContentClass
35+
3736
return {
37+
addClass,
3838
url,
3939
}
4040
},

src/styles/_examples.scss

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.tab-content {
12-
background-color: var(--#{$prefix}tertiary-bg) !important;
12+
background-color: var(--#{$prefix}tertiary-bg);
1313
}
1414

1515
& + p {
@@ -51,6 +51,9 @@
5151
}
5252

5353
// Buttons
54+
.col > .btn,
55+
.col-auto > .btn,
56+
.d-md-block > .btn,
5457
> .btn,
5558
> .btn-group {
5659
margin: .25rem .125rem;

src/views/base/Tables.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
</CTable>
448448
</DocsExample>
449449
<p class="text-body-secondary small">
450-
<a href="https://coreui.io/docs/4.0/utilities/borders#border-color">
450+
<a href="https://coreui.io/docs/utilities/borders#border-color">
451451
Border color utilities
452452
</a>
453453
can be added to change colors:

src/views/buttons/Buttons.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<CCardBody>
6060
<p class="text-body-secondary small">
6161
You can combine button with our
62-
<a href="https://icons.coreui.io/">CoreUI Icons</a>.
62+
<a href="https://coreui.io/icons/">CoreUI Icons</a>.
6363
</p>
6464
<DocsExample href="components/button.html">
6565
<template

src/views/notifications/Alerts.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<strong>required</strong> contextual <code>color</code> props (e.g.,
1313
<code>primary</code>). For inline dismissal, use the
1414
<a
15-
href="https://coreui.io/vue/docs/4.0/components/alert.html#dismissing"
15+
href="https://coreui.io/vue/docs/components/alert.html#dismissing"
1616
>
1717
dismissing prop
1818
</a>

src/views/notifications/Toasts.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@
133133
<CCardBody>
134134
<p class="text-body-secondary small">
135135
Customize your toasts by removing sub-components, tweaking them with
136-
<a href="https://coreui.io/docs/4.0/utilities/api">utilities</a>, or by adding your own
136+
<a href="https://coreui.io/docs/utilities/api">utilities</a>, or by adding your own
137137
markup. Here we&#39;ve created a simpler toast by removing the default
138138
<code>&lt;CToastHeader&gt;</code>, adding a custom hide icon from
139-
<a href="https://icons.coreui.io">CoreUI Icons</a>, and using some
140-
<a href="https://coreui.io/docs/4.0/utilities/flex">flexbox utilities</a> to adjust the
139+
<a href="https://coreui.io/icons/">CoreUI Icons</a>, and using some
140+
<a href="https://coreui.io/docs/utilities/flex">flexbox utilities</a> to adjust the
141141
layout.
142142
</p>
143143
<DocsExample href="components/toast.html#custom-content">
@@ -173,8 +173,8 @@
173173
<CCardBody>
174174
<p class="text-body-secondary small">
175175
Building on the above example, you can create different toast color schemes with our
176-
<a href="https://coreui.io/docs/4.0/utilities/colors">color</a> and
177-
<a href="https://coreui.io/docs/4.0//utilities/background">background</a> utilities.
176+
<a href="https://coreui.io/docs/utilities/colors">color</a> and
177+
<a href="https://coreui.io/docs//utilities/background">background</a> utilities.
178178
Here we&#39;ve set <code>color=&#34;primary&#34;</code> and added
179179
<code>.text-white</code> class to the <code>&lt;Ctoast&gt;</code>, and then set
180180
<code>white</code> property to our close button. For a crisp edge, we remove the default

0 commit comments

Comments
 (0)