Skip to content

Commit c9d4f52

Browse files
committed
chore: use EnrichedTextInput in example-web app
1 parent ab9c9d0 commit c9d4f52

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

apps/example-web/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import './App.css';
2+
import { EnrichedTextInput } from 'react-native-enriched';
23

34
function App() {
45
return (
56
<div className="container">
6-
<div>Text input</div>
7-
<input type="text" placeholder="Type something..." />
7+
<EnrichedTextInput defaultValue="Hello from web!" />
88
</div>
99
);
1010
}

src/web/EnrichedTextInput.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import type {
66

77
export interface EnrichedTextInputProps extends BaseEnrichedTextInputProps {}
88

9-
export const EnrichedTextInput = ({ ref }: EnrichedTextInputProps) => {
9+
export const EnrichedTextInput = ({
10+
ref,
11+
defaultValue,
12+
}: EnrichedTextInputProps) => {
1013
useImperativeHandle(
1114
ref,
1215
(): EnrichedTextInputInstance => ({
@@ -43,5 +46,5 @@ export const EnrichedTextInput = ({ ref }: EnrichedTextInputProps) => {
4346
})
4447
);
4548

46-
return <div />;
49+
return <textarea defaultValue={defaultValue} />;
4750
};

0 commit comments

Comments
 (0)