Skip to content

Commit d85bf9a

Browse files
committed
refactor: move components from reusable to components
1 parent 7c0862a commit d85bf9a

File tree

42 files changed

+519
-504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+519
-504
lines changed

src/_nav.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ const _nav = [
121121
{
122122
component: 'CNavGroup',
123123
name: 'Buttons',
124+
to: '/buttons',
124125
icon: <CIcon name="cil-cursor" customClassName="nav-icon" />,
125126
items: [
126127
{
File renamed without changes.

src/reusable/Example.js renamed to src/components/DocsExample.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import CIcon from '@coreui/icons-react'
55

66
import packageJson from '../../package.json'
77

8-
const Example = (props) => {
8+
const DocsExample = (props) => {
99
const { children, href } = props
1010

1111
const _href = `https://coreui.io/react/docs/${packageJson.config.coreui_library_short_version}/${href}`
@@ -35,9 +35,9 @@ const Example = (props) => {
3535
)
3636
}
3737

38-
Example.propTypes = {
38+
DocsExample.propTypes = {
3939
children: PropTypes.node,
4040
href: PropTypes.string,
4141
}
4242

43-
export default React.memo(Example)
43+
export default React.memo(DocsExample)
File renamed without changes.

src/components/index.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,18 @@ import AppFooter from './AppFooter'
44
import AppHeader from './AppHeader'
55
import AppHeaderDropdown from './header/AppHeaderDropdown'
66
import AppSidebar from './AppSidebar'
7+
import DocsCallout from './DocsCallout'
8+
import DocsLink from './DocsLink'
9+
import DocsExample from './DocsExample'
710

8-
export { AppBreadcrumb, AppContent, AppFooter, AppHeader, AppHeaderDropdown, AppSidebar }
11+
export {
12+
AppBreadcrumb,
13+
AppContent,
14+
AppFooter,
15+
AppHeader,
16+
AppHeaderDropdown,
17+
AppSidebar,
18+
DocsCallout,
19+
DocsLink,
20+
DocsExample,
21+
}

src/reusable/index.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/views/components/base/accordion/Accordion.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
CAccordionHeader,
1313
CAccordionItem,
1414
} from '@coreui/react'
15-
import { DocsCallout, Example } from 'src/reusable'
15+
import { DocsCallout, DocsExample } from 'src/components'
1616

1717
const Accordion = () => {
1818
const [activeKey, setActiveKey] = useState(0)
@@ -32,7 +32,7 @@ const Accordion = () => {
3232
<p className="text-medium-emphasis small">
3333
Click the accordions below to expand/collapse the accordion content.
3434
</p>
35-
<Example href="components/accordion">
35+
<DocsExample href="components/accordion">
3636
<CAccordion>
3737
<CAccordionItem>
3838
<CAccordionHeader>
@@ -98,7 +98,7 @@ const Accordion = () => {
9898
</CAccordionCollapse>
9999
</CAccordionItem>
100100
</CAccordion>
101-
</Example>
101+
</DocsExample>
102102
</CCardBody>
103103
</CCard>
104104
<CCard className="mb-4">
@@ -111,7 +111,7 @@ const Accordion = () => {
111111
borders, and some rounded corners to render accordions edge-to-edge with their parent
112112
container.
113113
</p>
114-
<Example href="components/accordion#flush">
114+
<DocsExample href="components/accordion#flush">
115115
<CAccordion flush>
116116
<CAccordionItem>
117117
<CAccordionHeader>
@@ -177,7 +177,7 @@ const Accordion = () => {
177177
</CAccordionCollapse>
178178
</CAccordionItem>
179179
</CAccordion>
180-
</Example>
180+
</DocsExample>
181181
</CCardBody>
182182
</CCard>
183183
</CCol>

src/views/components/base/breadcrumbs/Breadcrumbs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
CRow,
1010
CLink,
1111
} from '@coreui/react'
12-
import { DocsCallout, Example } from 'src/reusable'
12+
import { DocsCallout, DocsExample } from 'src/components'
1313

1414
const Breadcrumbs = () => {
1515
return (
@@ -38,7 +38,7 @@ const Breadcrumbs = () => {
3838
</a>
3939
.
4040
</p>
41-
<Example href="components/breadcrumb">
41+
<DocsExample href="components/breadcrumb">
4242
<CBreadcrumb>
4343
<CBreadcrumbItem>
4444
<CLink href="#">Home</CLink>
@@ -66,7 +66,7 @@ const Breadcrumbs = () => {
6666
</CBreadcrumbItem>
6767
<CBreadcrumbItem active>Bootstrap</CBreadcrumbItem>
6868
</CBreadcrumb>
69-
</Example>
69+
</DocsExample>
7070
</CCardBody>
7171
</CCard>
7272
</CCol>

0 commit comments

Comments
 (0)