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

adding prev/next component container styles #289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CalendarPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ export default class CalendarPicker extends Component {
todayBackgroundColor,
width,
height,
dayShape
dayShape,
nextPrevComponentContainer
} = props;

// The styles in makeStyles are intially scaled to this width
Expand All @@ -151,7 +152,8 @@ export default class CalendarPicker extends Component {
selectedDayColor,
selectedDayTextColor,
todayBackgroundColor,
dayShape
dayShape,
nextPrevComponentContainer
})
};
}
Expand Down
5 changes: 4 additions & 1 deletion CalendarPicker/makeStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export function makeStyles(params) {
selectedDayColor,
selectedDayTextColor,
todayBackgroundColor,
dayShape
dayShape,
nextPrevComponentContainer
} = params;
const scaler = Math.min(containerWidth, containerHeight) / scaleFactor;
const SELECTED_BG_COLOR = selectedDayColor ? selectedDayColor : DEFAULT_SELECTED_BACKGROUND_COLOR;
Expand Down Expand Up @@ -160,11 +161,13 @@ export function makeStyles(params) {

previousContainer: {
marginLeft: 10*scaler,
...nextPrevComponentContainer
},

nextContainer: {
marginRight: 10*scaler,
alignItems: 'flex-end',
...nextPrevComponentContainer
},

navButtonText: {
Expand Down