Skip to content

Commit

Permalink
fix: fix responsiveness on mobile resolutions
Browse files Browse the repository at this point in the history
Close #3
  • Loading branch information
Valenreynoso17 committed Jan 26, 2024
1 parent 5feec64 commit 1ebc4d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ private void setState(boolean state) {
*/
public DayOfWeekSelector() {
getStyle().set("padding", "var(--lumo-space-m)");
this.setWidthFull();

buttonsLayout = new HorizontalLayout();
buttonsLayout.add(new DayOfWeekButton(DayOfWeek.SUNDAY, "S"));
Expand All @@ -91,6 +92,8 @@ public DayOfWeekSelector() {
buttonsLayout.add(new DayOfWeekButton(DayOfWeek.FRIDAY, "F"));
buttonsLayout.add(new DayOfWeekButton(DayOfWeek.SATURDAY, "S"));

buttonsLayout.setClassName("fc-days-of-week-selector-buttons-layout");

getButtons().forEach(button -> button.addClickListener(ev -> updateValue()));
add(buttonsLayout);
clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,10 @@ vaadin-custom-field[readonly] vaadin-button.fc-days-of-week-selector-button[disa
vaadin-custom-field[readonly] vaadin-button.fc-days-of-week-selector-button[theme~='primary'][disabled] {
border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
}

vaadin-horizontal-layout.fc-days-of-week-selector-buttons-layout {
width: 100%;
justify-content: center;
flex-wrap: wrap;
padding: 0 10px;
}

0 comments on commit 1ebc4d4

Please sign in to comment.