refactor: update examples
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
to initialize operations, both in the background or foreground of an
|
||||
experience.
|
||||
</p>
|
||||
<Example href="components/buttons">
|
||||
<DocsExample href="components/buttons">
|
||||
<template
|
||||
v-for="state in ['normal', 'active', 'disabled']"
|
||||
:key="state"
|
||||
@@ -50,7 +50,7 @@
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -64,7 +64,7 @@
|
||||
You can combine button with our
|
||||
<a href="https://icons.coreui.io/">CoreUI Icons</a>.
|
||||
</p>
|
||||
<Example href="components/buttons">
|
||||
<DocsExample href="components/buttons">
|
||||
<template
|
||||
v-for="state in ['normal', 'active', 'disabled']"
|
||||
:key="state"
|
||||
@@ -100,7 +100,7 @@
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -124,7 +124,7 @@
|
||||
<code>role="button"</code> to adequately communicate their
|
||||
meaning to assistive technologies such as screen readers.
|
||||
</p>
|
||||
<Example href="components/buttons#button-components">
|
||||
<DocsExample href="components/buttons#button-components">
|
||||
<CButton component="a" color="primary" href="#" role="button">
|
||||
Link
|
||||
</CButton>
|
||||
@@ -147,7 +147,7 @@
|
||||
color="primary"
|
||||
value="Reset"
|
||||
/>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -162,7 +162,7 @@
|
||||
<code>variant="outline"</code> prop to remove all background
|
||||
colors.
|
||||
</p>
|
||||
<Example href="components/buttons#outline-buttons">
|
||||
<DocsExample href="components/buttons#outline-buttons">
|
||||
<template
|
||||
v-for="state in ['normal', 'active', 'disabled']"
|
||||
:key="state"
|
||||
@@ -198,7 +198,7 @@
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -213,7 +213,7 @@
|
||||
<code>variant="ghost"</code> prop to remove all background
|
||||
colors.
|
||||
</p>
|
||||
<Example href="components/buttons#ghost-buttons">
|
||||
<DocsExample href="components/buttons#ghost-buttons">
|
||||
<template
|
||||
v-for="state in ['normal', 'active', 'disabled']"
|
||||
:key="state"
|
||||
@@ -249,7 +249,7 @@
|
||||
</CCol>
|
||||
</CRow>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -263,14 +263,14 @@
|
||||
Larger or smaller buttons? Add <code>size="lg"</code> or
|
||||
<code>size="sm"</code> for additional sizes.
|
||||
</p>
|
||||
<Example href="components/buttons#sizes">
|
||||
<DocsExample href="components/buttons#sizes">
|
||||
<CButton color="primary" size="lg"> Large button </CButton>
|
||||
<CButton color="secondary" size="lg"> Large button </CButton>
|
||||
</Example>
|
||||
<Example href="components/buttons#sizes">
|
||||
</DocsExample>
|
||||
<DocsExample href="components/buttons#sizes">
|
||||
<CButton color="primary" size="sm"> Small button </CButton>
|
||||
<CButton color="secondary" size="sm"> Small button </CButton>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -280,7 +280,7 @@
|
||||
<strong>Vue Button</strong> <small>Pill</small>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<Example href="components/buttons#pill-buttons">
|
||||
<DocsExample href="components/buttons#pill-buttons">
|
||||
<template
|
||||
v-for="color in [
|
||||
'primary',
|
||||
@@ -303,7 +303,7 @@
|
||||
{{ color.charAt(0).toUpperCase() + color.slice(1) }}
|
||||
</CButton>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -313,7 +313,7 @@
|
||||
<strong>Vue Button</strong> <small>Square</small>
|
||||
</CCardHeader>
|
||||
<CCardBody>
|
||||
<Example href="components/buttons#square">
|
||||
<DocsExample href="components/buttons#square">
|
||||
<template
|
||||
v-for="color in [
|
||||
'primary',
|
||||
@@ -336,7 +336,7 @@
|
||||
{{ color.charAt(0).toUpperCase() + color.slice(1) }}
|
||||
</CButton>
|
||||
</template>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -353,12 +353,12 @@
|
||||
<code>pointer-events: none</code> applied to, disabling hover and
|
||||
active states from triggering.
|
||||
</p>
|
||||
<Example href="components/buttons#disabled-state">
|
||||
<DocsExample href="components/buttons#disabled-state">
|
||||
<CButton color="primary" size="lg" disabled>
|
||||
Primary button
|
||||
</CButton>
|
||||
<CButton color="secondary" size="lg" disabled> Button </CButton>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
<p class="text-medium-emphasis small">
|
||||
Disabled buttons using the <code><a></code> component act a
|
||||
little different:
|
||||
@@ -371,7 +371,7 @@
|
||||
<code>aria-disabled="true"</code> attribute to show the
|
||||
state of the component to assistive technologies.
|
||||
</p>
|
||||
<Example href="components/buttons#disabled-state">
|
||||
<DocsExample href="components/buttons#disabled-state">
|
||||
<CButton component="a" href="#" color="primary" size="lg" disabled>
|
||||
Primary link
|
||||
</CButton>
|
||||
@@ -384,7 +384,7 @@
|
||||
>
|
||||
Link
|
||||
</CButton>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
@@ -398,12 +398,12 @@
|
||||
Create buttons that span the full width of a parent—by using
|
||||
utilities.
|
||||
</p>
|
||||
<Example href="components/buttons#block-buttons">
|
||||
<DocsExample href="components/buttons#block-buttons">
|
||||
<div class="d-grid gap-2">
|
||||
<CButton color="primary">Button</CButton>
|
||||
<CButton color="primary">Button</CButton>
|
||||
</div>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
<p class="text-medium-emphasis small">
|
||||
Here we create a responsive variation, starting with vertically
|
||||
stacked buttons until the <code>md</code> breakpoint, where
|
||||
@@ -411,24 +411,24 @@
|
||||
thus nullifying the <code>gap-2</code> utility. Resize your browser
|
||||
to see them change.
|
||||
</p>
|
||||
<Example href="components/buttons#block-buttons">
|
||||
<DocsExample href="components/buttons#block-buttons">
|
||||
<div class="d-grid gap-2 d-md-block">
|
||||
<CButton color="primary">Button</CButton>
|
||||
<CButton color="primary">Button</CButton>
|
||||
</div>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
<p class="text-medium-emphasis small">
|
||||
You can adjust the width of your block buttons with grid column
|
||||
width classes. For example, for a half-width "block button",
|
||||
use <code>.col-6</code>. Center it horizontally with
|
||||
<code>.mx-auto</code>, too.
|
||||
</p>
|
||||
<Example href="components/buttons#block-buttons">
|
||||
<DocsExample href="components/buttons#block-buttons">
|
||||
<div class="d-grid gap-2 col-6 mx-auto">
|
||||
<CButton color="primary">Button</CButton>
|
||||
<CButton color="primary">Button</CButton>
|
||||
</div>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
<p class="text-medium-emphasis small">
|
||||
Additional utilities can be used to adjust the alignment of buttons
|
||||
when horizontal. Here we've taken our previous responsive
|
||||
@@ -436,12 +436,12 @@
|
||||
button to right align the buttons when they're no longer
|
||||
stacked.
|
||||
</p>
|
||||
<Example href="components/buttons#block-buttons">
|
||||
<DocsExample href="components/buttons#block-buttons">
|
||||
<div class="d-grid gap-2 d-md-flex justify-content-md-end">
|
||||
<CButton color="primary" class="me-md-2"> Button </CButton>
|
||||
<CButton color="primary">Button</CButton>
|
||||
</div>
|
||||
</Example>
|
||||
</DocsExample>
|
||||
</CCardBody>
|
||||
</CCard>
|
||||
</CCol>
|
||||
|
||||
Reference in New Issue
Block a user