Commit 3e0845a3 authored by Jure's avatar Jure

Merge branch 'action-group-fix' into 'master'

fix(ui): add class name & remove redundant prop type

See merge request !499
parents 74e323e3 f90593c3
......@@ -2,8 +2,6 @@ import React from 'react'
import styled from 'styled-components'
import { override, th } from '@pubsweet/ui-toolkit'
import Action from './Action'
const Group = styled.div`
${override('ui.ActionGroup')};
`
......@@ -21,22 +19,7 @@ const ActionGroup = props => {
child => child && <ActionWrapper>{child}</ActionWrapper>,
)
return <Group>{children}</Group>
}
ActionGroup.propTypes = {
children: (props, propName, componentName) => {
const prop = props[propName]
let error = null
React.Children.forEach(prop, child => {
if (child.type !== Action) {
error = new Error('ActionGroup should only take Actions as children')
}
})
return error
},
return <Group className={props.className}>{children}</Group>
}
export default ActionGroup
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment