coreui-free-react-admin-template
122 строки · 4.5 Кб
1import React from 'react'2import { CButton, CCard, CCardBody, CCardHeader, CCol, CBadge, CRow } from '@coreui/react'3import { DocsExample } from 'src/components'4
5const Badges = () => {6return (7<CRow>8<CCol lg={6}>9<CCard className="mb-4">10<CCardHeader>11<strong>React Badges</strong> <small>Dismissing</small>12</CCardHeader>13<CCardBody>14<p className="text-body-secondary small">15Bootstrap badge scale to suit the size of the parent element by using relative font16sizing and <code>em</code> units.17</p>18<DocsExample href="components/badge">19<h1>20Example heading <CBadge color="secondary">New</CBadge>21</h1>22<h2>23Example heading <CBadge color="secondary">New</CBadge>24</h2>25<h3>26Example heading <CBadge color="secondary">New</CBadge>27</h3>28<h4>29Example heading <CBadge color="secondary">New</CBadge>30</h4>31<h5>32Example heading <CBadge color="secondary">New</CBadge>33</h5>34<h6>35Example heading <CBadge color="secondary">New</CBadge>36</h6>37</DocsExample>38<p className="text-body-secondary small">39Badges can be used as part of links or buttons to provide a counter.40</p>41<DocsExample href="components/badge">42<CButton color="primary">43Notifications <CBadge color="secondary">4</CBadge>44</CButton>45</DocsExample>46<p className="text-body-secondary small">47Remark that depending on how you use them, badges may be complicated for users of48screen readers and related assistive technologies.49</p>50<p className="text-body-secondary small">51Unless the context is clear, consider including additional context with a visually52hidden piece of additional text.53</p>54<DocsExample href="components/badge">55<CButton color="primary">56Profile <CBadge color="secondary">9</CBadge>57<span className="visually-hidden">unread messages</span>58</CButton>59</DocsExample>60</CCardBody>61</CCard>62</CCol>63<CCol lg={6}>64<CCard className="mb-4">65<CCardHeader>66<strong>React Badges</strong> <small>Contextual variations</small>67</CCardHeader>68<CCardBody>69<p className="text-body-secondary small">70Add any of the below-mentioned <code>color</code> props to modify the presentation of71a badge.72</p>73<DocsExample href="components/badge#contextual-variations">74<CBadge color="primary">primary</CBadge>75<CBadge color="success">success</CBadge>76<CBadge color="danger">danger</CBadge>77<CBadge color="warning">warning</CBadge>78<CBadge color="info">info</CBadge>79<CBadge color="light">light</CBadge>80<CBadge color="dark">dark</CBadge>81</DocsExample>82</CCardBody>83</CCard>84<CCard className="mb-4">85<CCardHeader>86<strong>React Badges</strong> <small>Pill badges</small>87</CCardHeader>88<CCardBody>89<p className="text-body-secondary small">90Apply the <code>shape="rounded-pill"</code> prop to make badges rounded.91</p>92<DocsExample href="components/badge#pill-badges">93<CBadge color="primary" shape="rounded-pill">94primary
95</CBadge>96<CBadge color="success" shape="rounded-pill">97success
98</CBadge>99<CBadge color="danger" shape="rounded-pill">100danger
101</CBadge>102<CBadge color="warning" shape="rounded-pill">103warning
104</CBadge>105<CBadge color="info" shape="rounded-pill">106info
107</CBadge>108<CBadge color="light" shape="rounded-pill">109light
110</CBadge>111<CBadge color="dark" shape="rounded-pill">112dark
113</CBadge>114</DocsExample>115</CCardBody>116</CCard>117</CCol>118</CRow>119)120}
121
122export default Badges123