File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,11 @@ export interface IBodyProps extends React.HTMLAttributes<HTMLDivElement> {
25
25
26
26
const ClayModalBody : React . FunctionComponent < IBodyProps > = ( {
27
27
children,
28
+ className,
28
29
iFrameProps = { } ,
29
30
scrollable,
30
31
url,
32
+ ...otherProps
31
33
} : IBodyProps ) => {
32
34
const elementRef = useRef < HTMLDivElement | null > ( null ) ;
33
35
@@ -55,12 +57,13 @@ const ClayModalBody: React.FunctionComponent<IBodyProps> = ({
55
57
56
58
return (
57
59
< div
58
- className = { classNames ( 'modal-body' , {
60
+ className = { classNames ( 'modal-body' , className , {
59
61
'inline-scroller' : scrollable ,
60
62
'modal-body-iframe' : url ,
61
63
} ) }
62
64
ref = { elementRef }
63
65
tabIndex = { scrollable ? - 1 : undefined }
66
+ { ...otherProps }
64
67
>
65
68
{ url ? < iframe { ...iFrameProps } src = { url } title = { url } /> : children }
66
69
</ div >
Original file line number Diff line number Diff line change 3
3
* SPDX-License-Identifier: BSD-3-Clause
4
4
*/
5
5
6
+ import classNames from 'classnames' ;
6
7
import React from 'react' ;
7
8
8
- export interface IFooterProps {
9
+ export interface IFooterProps extends React . HTMLAttributes < HTMLDivElement > {
9
10
/**
10
11
* Sets the elements that are positioned `first following
11
12
* the LTR direction on the footer.
@@ -26,15 +27,19 @@ export interface IFooterProps {
26
27
}
27
28
28
29
const ClayModalFooter : React . FunctionComponent < IFooterProps > = ( {
30
+ className,
29
31
first,
30
32
last,
31
33
middle,
32
- } : IFooterProps ) => (
33
- < div className = "modal-footer" >
34
- < div className = "modal-item-first" > { first } </ div >
35
- < div className = "modal-item" > { middle } </ div >
36
- < div className = "modal-item-last" > { last } </ div >
37
- </ div >
38
- ) ;
34
+ ...otherProps
35
+ } : IFooterProps ) => {
36
+ return (
37
+ < div className = { classNames ( 'modal-footer' , className ) } { ...otherProps } >
38
+ < div className = "modal-item-first" > { first } </ div >
39
+ < div className = "modal-item" > { middle } </ div >
40
+ < div className = "modal-item-last" > { last } </ div >
41
+ </ div >
42
+ ) ;
43
+ } ;
39
44
40
45
export default ClayModalFooter ;
You can’t perform that action at this time.
0 commit comments