Skip to content

Commit d13bd97

Browse files
committed
feat(Input): introduce onChange api
1 parent bf8e0ed commit d13bd97

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/op-input/op-input.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@ import { Component, Prop } from '@stencil/core';
77
export class OpInput {
88
@Prop() type: string;
99
@Prop() label: string;
10+
@Prop() onChange: any;
1011
@Prop() id: string;
1112
render() {
1213
return (
1314
<div class="op-input__wrap">
1415
<op-label>
1516
<span class="op-input__text">{this.label}</span>
16-
<input id={this.id || null} class="op-input" type={this.type} />
17+
<input
18+
onChange={this.onChange}
19+
id={this.id || null}
20+
class="op-input"
21+
type={this.type}
22+
/>
1723
</op-label>
1824
</div>
1925
);

0 commit comments

Comments
 (0)