Commit 9bff385d authored by Giannis Kopanas's avatar Giannis Kopanas

fix(css): fix responsiveness of actions

parent b1cab9ae
Pipeline #8364 failed with stages
in 16 seconds
......@@ -3,8 +3,6 @@ import { th } from '@pubsweet/ui-toolkit'
export default {
Root: css`
align-self: flex-start;
display: flex;
> * {
&:last-child {
border-right: 0;
......
......@@ -21,27 +21,30 @@ const VersionTitleLink = styled(ProjectLink)`
text-decoration: none;
color: #333;
`
const NoSpaceAction = styled(Action)`
white-space: nowrap;
`
const EditorItemLinks = ({ project, version }) => (
<ActionGroup>
<NoSpaceAction to={`/projects/${project.id}/versions/${version.id}/submit`}>
Summary Info
</NoSpaceAction>
<NoSpaceAction
to={`/projects/${project.id}/versions/${version.id}/decisions/${
project.id
}`}
>
{version.decision && version.decision.status === 'submitted'
? `Decision: ${version.decision.recommendation}`
: 'Control Panel'}
</NoSpaceAction>
</ActionGroup>
<StyledEditorItemLinks>
<ActionGroup>
<Action to={`/projects/${project.id}/versions/${version.id}/submit`}>
Summary Info
</Action>
<Action
to={`/projects/${project.id}/versions/${version.id}/decisions/${
project.id
}`}
>
{version.decision && version.decision.status === 'submitted'
? `Decision: ${version.decision.recommendation}`
: 'Control Panel'}
</Action>
</ActionGroup>
</StyledEditorItemLinks>
)
const StyledEditorItemLinks = styled.div`
flex-shrink: 0;
`
const getDeclarationsObject = (version, value) => {
const declarations = version.declarations || {}
return declarations[value] || 'no'
......
......@@ -8,8 +8,8 @@ import { Item, Header, Body } from '../molecules/Item'
import Status from '../Status'
import VersionTitle from './VersionTitle'
const NoSpaceAction = styled(Action)`
white-space: nowrap;
const StyledActions = styled.div`
flex-shrink: 0;
`
const OwnerItem = ({ project, version, deleteProject }) => {
......@@ -24,13 +24,9 @@ const OwnerItem = ({ project, version, deleteProject }) => {
const manuscriptLink = `${baseLink}/manuscript`
const actionButtons = {
submit: <NoSpaceAction to={submitLink}>Summary Info</NoSpaceAction>,
submit: <Action to={submitLink}>Summary Info</Action>,
manuscript: <Action to={manuscriptLink}>Manuscript</Action>,
delete: (
<Action onClick={() => deleteProject(project)} to="#">
Delete
</Action>
),
delete: <Action onClick={() => deleteProject(project)}>Delete</Action>,
}
const unauthorized = (
......@@ -52,7 +48,7 @@ const OwnerItem = ({ project, version, deleteProject }) => {
const body = (
<Body>
<VersionTitle version={version} />
{actions}
<StyledActions>{actions}</StyledActions>
</Body>
)
......
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