File tree 6 files changed +55
-120
lines changed
6 files changed +55
-120
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
4
- import CButtonClose from './CButtonClose' ;
1
+ import React from 'react'
2
+ import CButtonClose from './CButtonClose'
5
3
6
4
//component - CoreUI / CSidebarClose
7
5
8
- const CSidebarClose = props => {
9
-
10
- const {
11
- className,
12
- ...attributes
13
- } = props ;
14
-
15
- // render
16
-
17
- const classes = classNames (
18
- 'c-sidebar-close' ,
19
- className
20
- ) ;
21
-
6
+ const CSidebarClose = props => {
22
7
return (
23
- < CButtonClose { ...attributes } buttonClass = { classes } >
8
+ < CButtonClose { ...props } buttonClass = { 'c-sidebar-close' } >
24
9
< svg className = "c-icon" width = "24" height = "24" viewBox = "0 0 24 24" >
25
10
< title > x</ title >
26
11
< path d = "M20.030 5.030l-1.061-1.061-6.97 6.97-6.97-6.97-1.061 1.061 6.97 6.97-6.97 6.97 1.061 1.061 6.97-6.97 6.97 6.97 1.061-1.061-6.97-6.97 6.97-6.97z" > </ path >
27
12
</ svg >
28
13
</ CButtonClose >
29
- ) ;
30
-
14
+ )
31
15
}
32
16
33
- CSidebarClose . propTypes = {
34
- children : PropTypes . node ,
35
- className : PropTypes . string ,
36
- //
37
- innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
38
- } ;
39
-
40
- CSidebarClose . defaultProps = {
41
- } ;
42
-
43
- export default CSidebarClose ;
17
+ export default CSidebarClose
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import classNames from 'classnames'
4
4
5
5
//component - CoreUI / CSidebarFooter
6
6
7
- const CSidebarFooter = props => {
7
+ const CSidebarFooter = props => {
8
8
9
9
const {
10
10
tag : Tag ,
11
- children,
12
11
className,
13
12
//
14
13
innerRef,
15
14
...attributes
16
- } = props ;
15
+ } = props
17
16
18
17
// render
19
-
20
- const classes = classNames ( className , 'c-sidebar-footer' ) ;
18
+ const classes = classNames ( 'c-sidebar-footer' , className )
21
19
22
20
return (
23
- children ?
24
- < Tag className = { classes } { ...attributes } ref = { innerRef } >
25
- { children }
26
- </ Tag >
27
- : null
28
- ) ;
29
-
21
+ < Tag className = { classes } { ...attributes } ref = { innerRef } />
22
+ )
30
23
}
31
24
32
25
CSidebarFooter . propTypes = {
33
26
tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
34
- children : PropTypes . node ,
35
27
className : PropTypes . string ,
36
28
//
37
29
innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
@@ -41,4 +33,4 @@ CSidebarFooter.defaultProps = {
41
33
tag : 'div'
42
34
} ;
43
35
44
- export default CSidebarFooter ;
36
+ export default CSidebarFooter
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import classNames from 'classnames'
4
4
5
5
//component - CoreUI / CSidebarForm
6
6
7
- const CSidebarForm = props => {
7
+ const CSidebarForm = props => {
8
8
9
9
const {
10
10
tag : Tag ,
11
- children,
12
11
className,
13
12
//
14
13
innerRef,
15
14
...attributes
16
- } = props ;
15
+ } = props
17
16
18
17
//render
19
18
20
- const classes = classNames ( className , 'c-sidebar-form' ) ;
19
+ const classes = classNames ( 'c-sidebar-form' , className )
21
20
22
21
return (
23
- children ?
24
- < Tag className = { classes } { ...attributes } ref = { innerRef } >
25
- { children }
26
- </ Tag >
27
- : null
28
- ) ;
29
-
22
+ < Tag className = { classes } { ...attributes } ref = { innerRef } />
23
+ )
30
24
}
31
25
32
26
CSidebarForm . propTypes = {
33
27
tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
34
- children : PropTypes . node ,
35
28
className : PropTypes . string ,
36
29
//
37
30
innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
@@ -41,4 +34,4 @@ CSidebarForm.defaultProps = {
41
34
tag : 'div'
42
35
} ;
43
36
44
- export default CSidebarForm ;
37
+ export default CSidebarForm
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import classNames from 'classnames'
4
4
5
5
//component - CoreUI / CSidebarHeader
6
6
7
- const CSidebarHeader = props => {
7
+ const CSidebarHeader = props => {
8
8
9
9
const {
10
10
tag : Tag ,
11
- children,
12
11
className,
13
12
//
14
13
innerRef,
15
14
...attributes
16
- } = props ;
15
+ } = props
17
16
18
17
//render
19
18
20
- const classes = classNames (
21
- className ,
22
- 'c-sidebar-header'
23
- ) ;
19
+ const classes = classNames ( 'c-sidebar-header' , className )
24
20
25
21
return (
26
- children ?
27
- < Tag className = { classes } { ...attributes } ref = { innerRef } >
28
- { children }
29
- </ Tag >
30
- : null
31
- ) ;
32
-
22
+ < Tag className = { classes } { ...attributes } ref = { innerRef } />
23
+ )
33
24
}
34
25
35
26
CSidebarHeader . propTypes = {
36
27
tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
37
- children : PropTypes . node ,
38
28
className : PropTypes . string ,
39
29
//
40
30
innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
@@ -44,4 +34,4 @@ CSidebarHeader.defaultProps = {
44
34
tag : 'div'
45
35
} ;
46
36
47
- export default CSidebarHeader ;
37
+ export default CSidebarHeader
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import classNames from 'classnames'
4
4
5
5
//component - CoreUI / CSidebarNavDivider
6
6
7
- const CSidebarNavDivider = props => {
7
+ const CSidebarNavDivider = props => {
8
8
9
9
const {
10
- tag : Tag ,
11
10
className,
12
11
//
13
12
innerRef,
14
13
...attributes
15
- } = props ;
14
+ } = props
16
15
17
16
//render
18
17
19
18
const classes = classNames (
20
- className ,
21
- 'c-sidebar-nav-divider'
22
- ) ;
19
+ 'c-sidebar-nav-divider' ,
20
+ className
21
+ )
23
22
24
23
return (
25
- < Tag className = { classes } { ...attributes } ref = { innerRef } />
26
- ) ;
24
+ < li className = { classes } { ...attributes } ref = { innerRef } />
25
+ )
27
26
28
27
}
29
28
30
29
CSidebarNavDivider . propTypes = {
31
- tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
32
- children : PropTypes . node ,
33
30
className : PropTypes . string ,
34
31
//
35
32
innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
36
33
} ;
37
34
38
- CSidebarNavDivider . defaultProps = {
39
- tag : 'li'
40
- } ;
41
35
42
- export default CSidebarNavDivider ;
36
+ export default CSidebarNavDivider
Original file line number Diff line number Diff line change 1
- import React from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import classNames from 'classnames' ;
1
+ import React from 'react'
2
+ import PropTypes from 'prop-types'
3
+ import classNames from 'classnames'
4
4
5
5
//component - CoreUI / CSidebarNavTitle
6
6
7
- const CSidebarNavTitle = props => {
7
+ const CSidebarNavTitle = props => {
8
8
9
9
const {
10
- tag : Tag ,
11
10
className,
12
11
//
13
12
innerRef,
14
13
...attributes
15
- } = props ;
14
+ } = props
16
15
17
16
//render
18
-
19
17
const classes = classNames (
20
- className ,
21
- 'c-sidebar-nav-title'
22
- ) ;
18
+ 'c-sidebar-nav-title' ,
19
+ className
20
+ )
23
21
24
22
return (
25
- < Tag className = { classes } { ...attributes } ref = { innerRef } />
26
- ) ;
27
-
23
+ < li className = { classes } { ...attributes } ref = { innerRef } />
24
+ )
28
25
}
29
26
30
27
CSidebarNavTitle . propTypes = {
31
- tag : PropTypes . oneOfType ( [ PropTypes . func , PropTypes . string ] ) ,
32
- children : PropTypes . node ,
33
28
className : PropTypes . string ,
34
29
//
35
30
innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
36
31
} ;
37
32
38
- CSidebarNavTitle . defaultProps = {
39
- tag : 'li'
40
- } ;
41
33
42
- export default CSidebarNavTitle ;
34
+ export default CSidebarNavTitle
You can’t perform that action at this time.
0 commit comments