Skip to content
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

WIP - Tim's UI, CSS improvements (pt. 2) #867

Merged
merged 12 commits into from
Dec 6, 2017
3 changes: 2 additions & 1 deletion src/components/App/Header.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@
font-size: 12px;
font-weight: 600;
background-color: #7d8190;
padding: 4px 24px 4px 14px;
padding: 6px 24px 6px 14px;
margin-right: 8px;
color: #fff;
border-radius: 3px;

&:hover,
&:active,
Expand Down
4 changes: 3 additions & 1 deletion src/components/App/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ export default class Header extends React.Component {
<Dropdown
classNameButton="nc-appHeader-button nc-appHeader-quickNew"
label="Quick add"
dropdownTopOverlap="30px"
dropdownWidth="160px"
dropdownPosition="right"
dropdownPosition="left"
>
{
collections.filter(collection => collection.get('create')).toList().map(collection =>
Expand All @@ -90,6 +91,7 @@ export default class Header extends React.Component {
: null
}
<Dropdown
dropdownTopOverlap="50px"
dropdownWidth="100px"
dropdownPosition="right"
button={
Expand Down
3 changes: 2 additions & 1 deletion src/components/UI/Dropdown/Dropdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@

.nc-dropdownList {
@apply(--dropdownList);
margin: 0;
position: absolute;
top: 39px;
top: 0;
left: 0;
min-width: 100%;
z-index: 1;
Expand Down
2 changes: 2 additions & 0 deletions src/components/UI/Dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ const Dropdown = ({
classNameButton = '',
dropdownWidth = 'auto',
dropdownPosition = 'left',
dropdownTopOverlap = '0',
children
}) => {
const style = {
width: dropdownWidth,
top: dropdownTopOverlap,
left: dropdownPosition === 'left' ? 0 : 'auto',
right: dropdownPosition === 'right' ? 0 : 'auto',
};
Expand Down