Skip to content

Commit c63144d

Browse files
committed
user feedback form
1 parent 7445bdf commit c63144d

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-0
lines changed

src/components.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export namespace Components {
1616
"to"?: string;
1717
"value": string | number;
1818
}
19+
interface AppFeedback {
20+
}
1921
interface AppLanding {
2022
}
2123
interface AppLayout {
@@ -44,6 +46,12 @@ declare global {
4446
prototype: HTMLAppButtonElement;
4547
new (): HTMLAppButtonElement;
4648
};
49+
interface HTMLAppFeedbackElement extends Components.AppFeedback, HTMLStencilElement {
50+
}
51+
var HTMLAppFeedbackElement: {
52+
prototype: HTMLAppFeedbackElement;
53+
new (): HTMLAppFeedbackElement;
54+
};
4755
interface HTMLAppLandingElement extends Components.AppLanding, HTMLStencilElement {
4856
}
4957
var HTMLAppLandingElement: {
@@ -76,6 +84,7 @@ declare global {
7684
};
7785
interface HTMLElementTagNameMap {
7886
"app-button": HTMLAppButtonElement;
87+
"app-feedback": HTMLAppFeedbackElement;
7988
"app-landing": HTMLAppLandingElement;
8089
"app-layout": HTMLAppLayoutElement;
8190
"app-result": HTMLAppResultElement;
@@ -94,6 +103,8 @@ declare namespace LocalJSX {
94103
"to"?: string;
95104
"value"?: string | number;
96105
}
106+
interface AppFeedback {
107+
}
97108
interface AppLanding {
98109
}
99110
interface AppLayout {
@@ -110,6 +121,7 @@ declare namespace LocalJSX {
110121
}
111122
interface IntrinsicElements {
112123
"app-button": AppButton;
124+
"app-feedback": AppFeedback;
113125
"app-landing": AppLanding;
114126
"app-layout": AppLayout;
115127
"app-result": AppResult;
@@ -122,6 +134,7 @@ declare module "@stencil/core" {
122134
export namespace JSX {
123135
interface IntrinsicElements {
124136
"app-button": LocalJSX.AppButton & JSXBase.HTMLAttributes<HTMLAppButtonElement>;
137+
"app-feedback": LocalJSX.AppFeedback & JSXBase.HTMLAttributes<HTMLAppFeedbackElement>;
125138
"app-landing": LocalJSX.AppLanding & JSXBase.HTMLAttributes<HTMLAppLandingElement>;
126139
"app-layout": LocalJSX.AppLayout & JSXBase.HTMLAttributes<HTMLAppLayoutElement>;
127140
"app-result": LocalJSX.AppResult & JSXBase.HTMLAttributes<HTMLAppResultElement>;

src/global/app.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ h2 {
8282
font-weight: 600;
8383
}
8484

85+
textarea, ion-select {
86+
background: #ededed !important;
87+
border-radius: 3px;
88+
margin-bottom: 20px;
89+
}
90+
8591
@media only screen and (max-width: 390px) {
8692
h2 {
8793
margin-top: 10px;

src/helpers/routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ const routes = {
1111
url: '/page/result',
1212
component: 'app-result',
1313
},
14+
feedback: {
15+
url: '/page/feedback',
16+
component: 'app-feedback',
17+
},
1418
};
1519

1620
export default routes;

src/pages/feedback/feedback.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.feedback-btn {
2+
margin-top: 30px;
3+
display: grid;
4+
justify-content: center;
5+
}

src/pages/feedback/feedback.tsx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import { Component, h } from '@stencil/core';
2+
3+
@Component({
4+
tag: 'app-feedback',
5+
styleUrl: 'feedback.css',
6+
scoped: true,
7+
})
8+
export class FeedbackPage {
9+
10+
render() {
11+
return (
12+
<app-layout hasBack={false}>
13+
<div class="ion-padding">
14+
<h2 data-testid="landing-page-title">Ishihara Feedback form</h2>
15+
<form>
16+
<ion-row>
17+
<ion-col>
18+
<ion-label>Name</ion-label>
19+
<ion-input type="text"></ion-input>
20+
</ion-col>
21+
</ion-row>
22+
<ion-row>
23+
<ion-col>
24+
<ion-label>Email</ion-label>
25+
<ion-input type="email"></ion-input>
26+
</ion-col>
27+
</ion-row>
28+
<ion-row>
29+
<ion-col>
30+
<ion-label>Rating</ion-label>
31+
<ion-select>
32+
<ion-select-option value="1">1</ion-select-option>
33+
<ion-select-option value="2">2</ion-select-option>
34+
<ion-select-option value="3">3</ion-select-option>
35+
<ion-select-option value="4">4</ion-select-option>
36+
<ion-select-option value="5">5</ion-select-option>
37+
</ion-select>
38+
</ion-col>
39+
</ion-row>
40+
<ion-row>
41+
<ion-col>
42+
<ion-label>Message</ion-label>
43+
<ion-textarea></ion-textarea>
44+
</ion-col>
45+
</ion-row>
46+
</form>
47+
48+
<ion-row class="feedback-btn">
49+
<app-button dataTestId="feedback-btn" clickHandler={() => {}} value="Submit" expand="block" />
50+
</ion-row>
51+
</div>
52+
</app-layout>
53+
);
54+
}
55+
}

0 commit comments

Comments
 (0)