File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
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 { tagPropType , mapToCssModules } from './Shared/helper.js'
5
+
6
+ //component - CoreUI / CModalTitle
7
+ const CModalTitle = props => {
8
+
9
+ const {
10
+ tag : Tag ,
11
+ className,
12
+ cssModule,
13
+ //
14
+ innerRef,
15
+ ...attributes
16
+ } = props
17
+
18
+ //render
19
+
20
+ const classes = mapToCssModules ( classNames (
21
+ 'modal-title' , className
22
+ ) , cssModule )
23
+
24
+ return (
25
+ < Tag className = { classes } { ...attributes } ref = { innerRef } />
26
+ )
27
+ }
28
+
29
+ CModalTitle . propTypes = {
30
+ tag : tagPropType ,
31
+ className : PropTypes . string ,
32
+ cssModule : PropTypes . object ,
33
+ //
34
+ innerRef : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . func , PropTypes . string ] )
35
+ } ;
36
+
37
+ CModalTitle . defaultProps = {
38
+ tag : 'h5'
39
+ } ;
40
+
41
+ export default CModalTitle
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export {default as CModal} from './CModal';
66
66
export { default as CModalBody } from './CModalBody' ;
67
67
export { default as CModalHeader } from './CModalHeader' ;
68
68
export { default as CModalFooter } from './CModalFooter' ;
69
+ export { default as CModalTitle } from './CModalTitle' ;
69
70
export { default as CDataTable } from './CDataTable' ;
70
71
export { default as CFade } from './CFade' ;
71
72
export { default as CCustomInput } from './CCustomInput' ;
You can’t perform that action at this time.
0 commit comments