Eject from preact-cli

This commit is contained in:
2020-04-22 22:07:52 +02:00
parent b0339d2ce0
commit 5f0cad970e
52 changed files with 2276 additions and 13925 deletions

View File

@ -1,16 +1,10 @@
import { FunctionalComponent, h } from "preact";
import { Route, Router, RouterOnChangeArgs } from "preact-router";
import Home from "../routes/home";
import Project from "../routes/project";
import NotFoundPage from '../routes/notfound';
import Header from "./header";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((module as any).hot) {
// tslint:disable-next-line:no-var-requires
require("preact/debug");
}
import Home from "../routes/home/index";
import Project from "../routes/project/index";
import NotFoundPage from '../routes/notfound/index';
import Header from "./header/index";
const App: FunctionalComponent = () => {
let currentUrl: string;

View File

@ -1,6 +1,5 @@
import { FunctionalComponent, h, Component, ComponentChild, Fragment } from "preact";
import { Link } from "preact-router/match";
import * as style from "./style.css";
import * as style from "./style.module.css";
import { useState, useEffect } from "preact/hooks";
export interface EditableTextProps {

View File

@ -1,3 +0,0 @@
// This file is automatically generated from your CSS. Any edits will be overwritten.
export const editableText: string;
export const editIcon: string;

View File

@ -0,0 +1,13 @@
declare namespace StyleModuleCssModule {
export interface IStyleModuleCss {
editIcon: string;
editableText: string;
}
}
declare const StyleModuleCssModule: StyleModuleCssModule.IStyleModuleCss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: StyleModuleCssModule.IStyleModuleCss;
};
export = StyleModuleCssModule;

View File

@ -1,5 +1,8 @@
import ProjectTimeUnit from "./project-time-unit";
import { defaults, getRoundUpEstimations } from "../models/params";
import { Project } from "../models/project";
import { FunctionalComponent, Fragment, h } from "preact";
import { Estimation } from "../hooks/use-project-estimations";
export interface EstimationRangeProps {
project: Project,
@ -9,8 +12,8 @@ export interface EstimationRangeProps {
export const EstimationRange: FunctionalComponent<EstimationRangeProps> = ({ project, estimation, sdFactor }) => {
const roundUp = getRoundUpEstimations(project);
let e = roundUp ? Math.ceil(estimation.e) : estimation.e;
let sd = roundUp ? Math.ceil(estimation.sd * sdFactor) : (estimation.sd * sdFactor);
let e: number|string = roundUp ? Math.ceil(estimation.e) : estimation.e;
let sd: number|string = roundUp ? Math.ceil(estimation.sd * sdFactor) : (estimation.sd * sdFactor);
const max = e+sd;
const min = Math.max(e-sd, 0);
if (!roundUp) {

View File

@ -1,6 +1,5 @@
import { FunctionalComponent, h } from "preact";
import { Link } from "preact-router/match";
import * as style from "./style.css";
import style from "./style.module.css";
export interface HeaderProps {
class?: string
@ -8,7 +7,7 @@ export interface HeaderProps {
const Header: FunctionalComponent<HeaderProps> = ({ ...props}) => {
return (
<div class={`container ${props.class ? props.class : ''}`}>
<div class={`container ${style.header} ${props.class ? props.class : ''}`}>
<div class="columns">
<div class="column">
<nav class="navbar" role="navigation" aria-label="main navigation">

View File

@ -1,3 +0,0 @@
// This file is automatically generated from your CSS. Any edits will be overwritten.
export const header: string;
export const active: string;

View File

@ -0,0 +1,3 @@
.header {
display: inherit;
}

View File

@ -0,0 +1,12 @@
declare namespace StyleModuleCssModule {
export interface IStyleModuleCss {
header: string;
}
}
declare const StyleModuleCssModule: StyleModuleCssModule.IStyleModuleCss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: StyleModuleCssModule.IStyleModuleCss;
};
export = StyleModuleCssModule;

View File

@ -1,5 +1,5 @@
import { FunctionalComponent, h, ComponentChild } from "preact";
import * as style from "./style.css";
import style from "./style.module.css";
import { useState } from "preact/hooks";
export interface TabItem {

View File

@ -1,3 +0,0 @@
// This file is automatically generated from your CSS. Any edits will be overwritten.
export const tabs: string;
export const tabContent: string;

View File

@ -0,0 +1,13 @@
declare namespace StyleModuleCssModule {
export interface IStyleModuleCss {
tabContent: string;
tabs: string;
}
}
declare const StyleModuleCssModule: StyleModuleCssModule.IStyleModuleCss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: StyleModuleCssModule.IStyleModuleCss;
};
export = StyleModuleCssModule;