Skip to content

Commit

Permalink
fix(demo): fix harmful styling use
Browse files Browse the repository at this point in the history
  • Loading branch information
paodb authored and javier-godoy committed Nov 17, 2023
1 parent 3640496 commit a8914aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class MonthDemo extends Div {

public MonthDemo() {

addClassName("month-demo");
MonthCalendar calendar = new MonthCalendar(YearMonth.now());

calendar.setClassNameGenerator(date -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class YearDemo extends Div {
TestUtils.getMethod(IntegerField.class, "setStepButtonsVisible", boolean.class).orElse(null);

public YearDemo() {
addClassName("year-demo");
YearCalendar calendar = new YearCalendar();
calendar.setClassNameGenerator(date -> {
if (TestUtils.isPublicHoliday(date)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.flowingcode.vaadin.addons.DemoLayout;
import com.flowingcode.vaadin.addons.GithubLink;
import com.flowingcode.vaadin.addons.demo.TabbedDemo;
import com.vaadin.flow.component.dependency.CssImport;
import com.vaadin.flow.component.dependency.StyleSheet;
import com.vaadin.flow.router.ParentLayout;
import com.vaadin.flow.router.Route;
Expand All @@ -30,7 +31,7 @@
@ParentLayout(DemoLayout.class)
@Route("year-month-calendar")
@GithubLink("https://github.com/FlowingCode/YearMonthCalendarAddon")
@StyleSheet("context://styles/ycalendar-styles.css")
@CssImport("./styles/ycalendar-styles.css")
public class YearMonthCalendarDemoView extends TabbedDemo {

public YearMonthCalendarDemoView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* limitations under the License.
* #L%
*/
#content vaadin-horizontal-layout {
.year-demo vaadin-horizontal-layout, .month-demo vaadin-horizontal-layout {
gap: 0px;
flex-wrap: wrap
}

#content vaadin-horizontal-layout > * {
.year-demo vaadin-horizontal-layout > *, .month-demo vaadin-horizontal-layout > * {
padding-left: 1ex;
}

0 comments on commit a8914aa

Please sign in to comment.