Skip to content

Commit 2696d30

Browse files
committed
docs: update documentation
1 parent c7d656c commit 2696d30

File tree

10 files changed

+19
-19
lines changed

10 files changed

+19
-19
lines changed

docs/layout/columns.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { CRow } from '../../src/components/grid/CRow.tsx'
1313

1414
## How they work
1515

16-
- **Columns build on the grid's flexbox architecture.** Flexbox means we have options for changing individual columns and [modifying groups of columns at the row level](./../grid#row-columns"). You choose how columns grow, shrink, or otherwise change.
16+
- **Columns build on the grid's flexbox architecture.** Flexbox means we have options for changing individual columns and [modifying groups of columns at the row level](./../grid#row-columns). You choose how columns grow, shrink, or otherwise change.
1717

1818
- **When building grid layouts, all content goes in columns.** The hierarchy of CoreUI's grid goes from [container](./../containers) to row to column to your content. On rare occasions, you may combine content and column, but be aware there can be unintended consequences.
1919

src/components/button/CButtonClose.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: React Close Button Component
33
name: Close Button
44
description: A generic close button component for dismissing content like modals and alerts.
55
menu: Components
6-
route: /components/buttons
6+
route: /components/close-buttons
77
---
88

99
import { Playground, Props } from 'docz'

src/components/card/CCard.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,10 @@ When using card groups with footers, their content will automatically line up.
592592

593593
### Grid cards
594594

595-
Use the `CRow` component and set `cols*` property to control how many grid columns (wrapped around your cards) you show per row. For example, here's `cols="1"` laying out the cards on one column, and `colsMd="2"` splitting four cards to equal width across multiple rows, from the medium breakpoint up.
595+
Use the `CRow` component and set `xs|sm|md|lg|xl|xxl}={{ cols: * }}` property to control how many grid columns (wrapped around your cards) you show per row. For example, here's `xs={{cols: 1}}` laying out the cards on one column, and `md={{cols: 1}}` splitting four cards to equal width across multiple rows, from the medium breakpoint up.
596596

597597
<Playground>
598-
<CRow cols="1" colsMd="2" className="g-4">
598+
<CRow xs={{ cols: 1, gutter: 4}} md={{ cols:2 }}>
599599
<CCol xs>
600600
<CCard>
601601
<CCardImage component="svg" orientation="top" className="docs-placeholder-img" width="100%" height="180" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Image cap" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#868e96"></rect><text x="50%" y="50%" fill="#dee2e6" dy=".3em">Image cap</text></CCardImage>
@@ -639,10 +639,10 @@ Use the `CRow` component and set `cols*` property to control how many grid colum
639639
</CRow>
640640
</Playground>
641641

642-
Change it to `colsMd="3"` and you'll see the fourth card wrap.
642+
Change it to `md={{ cols: 3}` and you'll see the fourth card wrap.
643643

644644
<Playground>
645-
<CRow cols="1" colsMd="3" className="g-4">
645+
<CRow xs={{ cols: 1, gutter: 4}} md={{ cols: 3 }}>
646646
<CCol xs>
647647
<CCard>
648648
<CCardImage component="svg" orientation="top" className="docs-placeholder-img" width="100%" height="180" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: Image cap" preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title><rect width="100%" height="100%" fill="#868e96"></rect><text x="50%" y="50%" fill="#dee2e6" dy=".3em">Image cap</text></CCardImage>

src/components/carousel/CCarousel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ You can attach the indicators to the carousel, lengthwise the controls, too.
9494

9595
### With captions
9696

97-
You can add captions to slides with the `<CCarouselCaption>` element within any `<CCarouselItem>`. They can be immediately hidden on smaller viewports, as shown below, with optional [display utilities](https://coreui.io/4.0/utilities/display"). We hide them with `.d-none` and draw them back on medium-sized devices with `.d-md-block`.
97+
You can add captions to slides with the `<CCarouselCaption>` element within any `<CCarouselItem>`. They can be immediately hidden on smaller viewports, as shown below, with optional [display utilities](https://coreui.io/4.0/utilities/display). We hide them with `.d-none` and draw them back on medium-sized devices with `.d-md-block`.
9898

9999
<Playground>
100100
{() => {

src/components/form/CInputGroup.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { CRow } from '../grid/CRow'
2727

2828
## Basic example
2929

30-
Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place `<label>`s outside the input group.
30+
Place one add-on or button on either side of an input. You may also place one on both sides of an input. Remember to place `<CFormLabel>`s outside the input group.
3131

3232
<Playground>
3333
<CInputGroup className="mb-3">
@@ -77,7 +77,7 @@ Input groups wrap by default via `flex-wrap: wrap` in order to accommodate custo
7777

7878
## Sizing
7979

80-
Add the relative form sizing classes to the `.input-group` itself and contents within will automatically resize—no need for repeating the form control size classes on each element.
80+
Add the relative form sizing classes to the `<CInputGroup>` itself and contents within will automatically resize—no need for repeating the form control size classes on each element.
8181

8282
**Sizing on the individual input group elements isn't supported.**
8383

@@ -120,7 +120,7 @@ Place any checkbox or radio option within an input group's addon instead of text
120120

121121
## Multiple inputs
122122

123-
While multiple `<input>`s are supported visually, validation styles are only available for input groups with a single `<input>`.
123+
While multiple `<CFormControl>`s are supported visually, validation styles are only available for input groups with a single `<CFormControl>`.
124124

125125
<Playground>
126126
<CInputGroup>

src/components/modal/CModal.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { CTooltip } from '../tooltip/CTooltip.tsx'
2727
Below is a static modal example (meaning its `position` and `display` have been overridden). Included are the modal header, modal body (required for `padding`), and modal footer (optional). We ask that you include modal headers with dismiss actions whenever possible, or provide another explicit dismiss action.
2828

2929
<Playground>
30-
<CModal className="show d-block position-static">
30+
<CModal className="show d-block position-static" backdrop={false} keyboard={false} portal={false} visible>
3131
<CModalHeader>
3232
<CModalTitle>Modal title</CModalTitle>
3333
</CModalHeader>
@@ -528,7 +528,7 @@ Another override is the option to pop up a modal that covers the user viewport,
528528
<td>Below <code>1200px</code></td>
529529
</tr>
530530
<tr>
531-
<td><code>'xx'n</code></td>
531+
<td><code>'xxl'</code></td>
532532
<td>Below <code>1400px</code></td>
533533
</tr>
534534
</tbody>

src/components/nav/CNav.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ For equal-width elements, use `layout="justified"`. All horizontal space will be
240240

241241
## Working with flex utilities
242242

243-
If you need responsive nav variations, consider using a series of [flexbox utilities](https://coreui.io/docs/utilities/flex"). While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
243+
If you need responsive nav variations, consider using a series of [flexbox utilities](https://coreui.io/docs/utilities/flex). While more verbose, these utilities offer greater customization across responsive breakpoints. In the example below, our nav will be stacked on the lowest breakpoint, then adapt to a horizontal layout that fills the available width starting from the small breakpoint.
244244

245245
<Playground>
246246
<CNav component="nav" variant="pills" className="flex-column flex-sm-row">

src/components/table/CTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Add `bordered` property for borders on all sides of the table and cells.
429429
</CTable>
430430
</Playground>
431431

432-
[Border color utilities](https://coreui.io/docs/4.0/utilities/borders#border-color") can be added to change colors:
432+
[Border color utilities](https://coreui.io/docs/4.0/utilities/borders#border-color) can be added to change colors:
433433

434434
<Playground>
435435
<CTable bordered borderColor="primary">

src/components/toast/CToast.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
5858
{() => {
5959
const [toast, addToast] = useState(0)
6060
const toaster = useRef()
61-
const toast2 = (
61+
const exampleToast = (
6262
<CToast title="CoreUI for React.js">
6363
<CToastHeader close>
6464
<svg
@@ -80,7 +80,7 @@ Toasts are as flexible as you need and have very little required markup. At a mi
8080
)
8181
return (
8282
<>
83-
<CButton onClick={() => addToast(toast2)}>Send a toast</CButton>
83+
<CButton onClick={() => addToast(exampleToast)}>Send a toast</CButton>
8484
<CToaster ref={toaster} push={toast} placement="top-end" />
8585
</>
8686
)
@@ -161,7 +161,7 @@ You can stack toasts by wrapping them in a toast container, which will verticall
161161

162162
### Custom content
163163

164-
Customize your toasts by removing sub-components, tweaking them with [utilities](https://coreui.io/docs/4.0/utilities/api"), or by adding your own markup. Here we've created a simpler toast by removing the default `.<CToastHeader>`, adding a custom hide icon from [CoreUI Icons](https://icons.coreui.io), and using some [flexbox utilities](https://coreui.io/docs/4.0/utilities/flex") to adjust the layout.
164+
Customize your toasts by removing sub-components, tweaking them with [utilities](https://coreui.io/docs/4.0/utilities/api), or by adding your own markup. Here we've created a simpler toast by removing the default `<CToastHeader>`, adding a custom hide icon from [CoreUI Icons](https://icons.coreui.io), and using some [flexbox utilities](https://coreui.io/docs/4.0/utilities/flex) to adjust the layout.
165165

166166
<Playground>
167167
<CToast autohide={false} className="align-items-center">
@@ -191,7 +191,7 @@ Alternatively, you can also add additional controls and components to toasts.
191191

192192
### Color schemes
193193

194-
Building on the above example, you can create different toast color schemes with our [color]({{< docsref "/utilities/colors" >}}) and [background]({{< docsref "/utilities/background" >}}) utilities. Here we've added `.bg-primary` and `.text-white` to the `.toast`, and then added `.btn-close-white` to our close button. For a crisp edge, we remove the default border with `.border-0`.
194+
Building on the above example, you can create different toast color schemes with our [color](https://coreui.io/docs/4.0/utilities/colors) and [background](https://coreui.io/docs/4.0//utilities/background) utilities. Here we've set `color="primary"` and added `.text-white` class to the `<Ctoast>`, and then set `white` property to our close button. For a crisp edge, we remove the default border with `.border-0`.
195195

196196
<Playground>
197197
<CToast autohide={false} color="primary" className="text-white align-items-center">

src/components/tooltip/CTooltip.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { CLink } from './../link/CLink.tsx'
1818
Hover over the links below to see tooltips:
1919

2020
<Playground>
21-
<p className="muted">
21+
<p className="text-medium-emphasis">
2222
Tight pants next level keffiyeh
2323
<CTooltip content="Tooltip text">
2424
<CLink> you probably </CLink>

0 commit comments

Comments
 (0)