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' ...@@ -2,8 +2,6 @@ import React from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { override, th } from '@pubsweet/ui-toolkit' import { override, th } from '@pubsweet/ui-toolkit'
import Action from './Action'
const Group = styled.div` const Group = styled.div`
${override('ui.ActionGroup')}; ${override('ui.ActionGroup')};
` `
...@@ -21,22 +19,7 @@ const ActionGroup = props => { ...@@ -21,22 +19,7 @@ const ActionGroup = props => {
child => child && <ActionWrapper>{child}</ActionWrapper>, child => child && <ActionWrapper>{child}</ActionWrapper>,
) )
return <Group>{children}</Group> return <Group className={props.className}>{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
},
} }
export default ActionGroup 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