-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added styled component to AddToCollectionList component #2368
Changes from 1 commit
d99e25a
8fc6ded
5c1e456
9c30c30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -4,7 +4,7 @@ import { Helmet } from 'react-helmet'; | |||||||
import { connect } from 'react-redux'; | ||||||||
import { bindActionCreators } from 'redux'; | ||||||||
import { withTranslation } from 'react-i18next'; | ||||||||
|
||||||||
import styled from 'styled-components'; | ||||||||
import * as ProjectActions from '../actions/project'; | ||||||||
import * as ProjectsActions from '../actions/projects'; | ||||||||
import * as CollectionsActions from '../actions/collections'; | ||||||||
|
@@ -13,10 +13,26 @@ import * as SortingActions from '../actions/sorting'; | |||||||
import getSortedCollections from '../selectors/collections'; | ||||||||
import Loader from '../../App/components/loader'; | ||||||||
import QuickAddList from './QuickAddList'; | ||||||||
import { remSize } from '../../../theme'; | ||||||||
|
||||||||
const projectInCollection = (project, collection) => | ||||||||
collection.items.find((item) => item.projectId === project.id) != null; | ||||||||
|
||||||||
const CollectionAddSketchWrapper = styled.div` | ||||||||
&&& { | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't really matter but I suspect that you'd be fine without the |
||||||||
min-width: ${remSize(600)}; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
overflow: auto; | ||||||||
} | ||||||||
`; | ||||||||
|
||||||||
const QuickAddWrapper = styled.div` | ||||||||
&&& { | ||||||||
min-width: ${remSize(600)}; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
padding: ${remSize(24)}; | ||||||||
height: 100%; | ||||||||
} | ||||||||
`; | ||||||||
|
||||||||
class CollectionList extends React.Component { | ||||||||
constructor(props) { | ||||||||
super(props); | ||||||||
|
@@ -85,15 +101,15 @@ class CollectionList extends React.Component { | |||||||
} | ||||||||
|
||||||||
return ( | ||||||||
<div className="collection-add-sketch"> | ||||||||
<div className="quick-add-wrapper"> | ||||||||
<CollectionAddSketchWrapper> | ||||||||
<QuickAddWrapper> | ||||||||
<Helmet> | ||||||||
<title>{this.getTitle()}</title> | ||||||||
</Helmet> | ||||||||
|
||||||||
{content} | ||||||||
</div> | ||||||||
</div> | ||||||||
</QuickAddWrapper> | ||||||||
</CollectionAddSketchWrapper> | ||||||||
); | ||||||||
} | ||||||||
} | ||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.