coreui-free-react-admin-template

Форк
0
120 строк · 4.7 Кб
1
import React from 'react'
2
import { CButton, CCard, CCardBody, CCardHeader, CCol, CSpinner, CRow } from '@coreui/react'
3
import { DocsExample } from 'src/components'
4

5
const Spinners = () => {
6
  return (
7
    <CRow>
8
      <CCol xs={12}>
9
        <CCard className="mb-4">
10
          <CCardHeader>
11
            <strong>React Spinner</strong> <small>Border</small>
12
          </CCardHeader>
13
          <CCardBody>
14
            <p className="text-body-secondary small">
15
              Use the border spinners for a lightweight loading indicator.
16
            </p>
17
            <DocsExample href="components/spinner">
18
              <CSpinner />
19
            </DocsExample>
20
            <p className="text-body-secondary small">
21
              The border spinner uses <code>currentColor</code> for its <code>border-color</code>.
22
              You can use any of our text color utilities on the standard spinner.
23
            </p>
24
            <DocsExample href="components/spinner#colors">
25
              <CSpinner color="primary" />
26
              <CSpinner color="secondary" />
27
              <CSpinner color="success" />
28
              <CSpinner color="danger" />
29
              <CSpinner color="warning" />
30
              <CSpinner color="info" />
31
              <CSpinner color="light" />
32
              <CSpinner color="dark" />
33
            </DocsExample>
34
          </CCardBody>
35
        </CCard>
36
      </CCol>
37
      <CCol xs={12}>
38
        <CCard className="mb-4">
39
          <CCardHeader>
40
            <strong>React Spinner</strong> <small>Growing</small>
41
          </CCardHeader>
42
          <CCardBody>
43
            <p className="text-body-secondary small">
44
              If you don&#39;tfancy a border spinner, switch to the grow spinner. While it
45
              doesn&#39;t technically spin, it does repeatedly grow!
46
            </p>
47
            <DocsExample href="components/spinner#growing-spinner">
48
              <CSpinner variant="grow" />
49
            </DocsExample>
50
            <p className="text-body-secondary small">
51
              Once again, this spinner is built with <code>currentColor</code>, so you can easily
52
              change its appearance. Here it is in blue, along with the supported variants.
53
            </p>
54
            <DocsExample href="components/spinner#growing-spinner">
55
              <CSpinner color="primary" variant="grow" />
56
              <CSpinner color="secondary" variant="grow" />
57
              <CSpinner color="success" variant="grow" />
58
              <CSpinner color="danger" variant="grow" />
59
              <CSpinner color="warning" variant="grow" />
60
              <CSpinner color="info" variant="grow" />
61
              <CSpinner color="light" variant="grow" />
62
              <CSpinner color="dark" variant="grow" />
63
            </DocsExample>
64
          </CCardBody>
65
        </CCard>
66
      </CCol>
67
      <CCol xs={12}>
68
        <CCard className="mb-4">
69
          <CCardHeader>
70
            <strong>React Spinner</strong> <small>Size</small>
71
          </CCardHeader>
72
          <CCardBody>
73
            <p className="text-body-secondary small">
74
              Add <code>size=&#34;sm&#34;</code> property to make a smaller spinner that can quickly
75
              be used within other components.
76
            </p>
77
            <DocsExample href="components/spinner#size">
78
              <CSpinner size="sm" />
79
              <CSpinner size="sm" variant="grow" />
80
            </DocsExample>
81
          </CCardBody>
82
        </CCard>
83
      </CCol>
84
      <CCol xs={12}>
85
        <CCard className="mb-4">
86
          <CCardHeader>
87
            <strong>React Spinner</strong> <small>Buttons</small>
88
          </CCardHeader>
89
          <CCardBody>
90
            <p className="text-body-secondary small">
91
              Use spinners within buttons to indicate an action is currently processing or taking
92
              place. You may also swap the text out of the spinner element and utilize button text
93
              as needed.
94
            </p>
95
            <DocsExample href="components/spinner#buttons">
96
              <CButton color="primary" disabled>
97
                <CSpinner as="span" size="sm" aria-hidden="true" />
98
              </CButton>
99
              <CButton color="primary" disabled>
100
                <CSpinner as="span" size="sm" aria-hidden="true" />
101
                Loading...
102
              </CButton>
103
            </DocsExample>
104
            <DocsExample href="components/spinner#buttons">
105
              <CButton color="primary" disabled>
106
                <CSpinner as="span" size="sm" variant="grow" aria-hidden="true" />
107
              </CButton>
108
              <CButton color="primary" disabled>
109
                <CSpinner as="span" size="sm" variant="grow" aria-hidden="true" />
110
                Loading...
111
              </CButton>
112
            </DocsExample>
113
          </CCardBody>
114
        </CCard>
115
      </CCol>
116
    </CRow>
117
  )
118
}
119

120
export default Spinners
121

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.