@@ -7,7 +7,7 @@ import ViewFiles from './actions/ViewFiles'
7
7
import { allowNull } from '../../resources/utilityFunctions'
8
8
import './actions-group.scss'
9
9
10
- const ActionsGroup = ( { handleSendingMessagesOrFiles, initialFiles } ) => {
10
+ const ActionsGroup = ( { backgroundColor , handleSendingMessagesOrFiles, initialFiles } ) => {
11
11
const [ show , setShow ] = useState ( false )
12
12
const [ action , setAction ] = useState ( null )
13
13
@@ -20,12 +20,14 @@ const ActionsGroup = ({ handleSendingMessagesOrFiles, initialFiles }) => {
20
20
setAction ( null )
21
21
setShow ( false )
22
22
}
23
+
23
24
return (
24
25
< >
25
26
< ListGroup className = 'actions-group' >
26
27
< ListGroup . Item
27
28
action
28
29
onClick = { ( ) => handleShow ( 'SendMessage' ) }
30
+ bsPrefix = { `bg-${ backgroundColor } -8 list-group-item` }
29
31
>
30
32
< FontAwesomeIcon icon = 'fa-envelope' />
31
33
Send Message
@@ -34,7 +36,7 @@ const ActionsGroup = ({ handleSendingMessagesOrFiles, initialFiles }) => {
34
36
action
35
37
onClick = { ( ) => handleShow ( 'ViewFiles' ) }
36
38
role = 'presentation'
37
- bsPrefix = ' bg-secondary-8 list-group-item'
39
+ bsPrefix = { ` bg-${ backgroundColor } -6 list-group-item` }
38
40
>
39
41
< FontAwesomeIcon icon = 'fa-file-lines' />
40
42
View Files
@@ -60,6 +62,7 @@ const ActionsGroup = ({ handleSendingMessagesOrFiles, initialFiles }) => {
60
62
}
61
63
62
64
ActionsGroup . propTypes = {
65
+ backgroundColor : PropTypes . string ,
63
66
handleSendingMessagesOrFiles : PropTypes . func . isRequired ,
64
67
initialFiles : PropTypes . arrayOf (
65
68
PropTypes . shape ( {
@@ -76,4 +79,8 @@ ActionsGroup.propTypes = {
76
79
) . isRequired ,
77
80
}
78
81
82
+ ActionsGroup . defaultProps = {
83
+ backgroundColor : 'secondary'
84
+ }
85
+
79
86
export default ActionsGroup
0 commit comments