Skip to content

feat: Add examples for input and textarea#79

Merged
MoonfaceX merged 1 commit intomainfrom
p/xiamengfei.moonface/input_textarea
Jun 5, 2025
Merged

feat: Add examples for input and textarea#79
MoonfaceX merged 1 commit intomainfrom
p/xiamengfei.moonface/input_textarea

Conversation

@MoonfaceX
Copy link
Copy Markdown
Collaborator

No description provided.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 5, 2025

⚠️ No Changeset found

Latest commit: faf2ad1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@MoonfaceX MoonfaceX requested a review from colinaaa June 5, 2025 13:01
@MoonfaceX MoonfaceX force-pushed the p/xiamengfei.moonface/input_textarea branch from c0b5b63 to faf2ad1 Compare June 5, 2025 13:02
@MoonfaceX MoonfaceX merged commit 97fbbfd into main Jun 5, 2025
2 checks passed
@MoonfaceX MoonfaceX deleted the p/xiamengfei.moonface/input_textarea branch June 5, 2025 13:07
<view style={{ linearOrientation: "vertical", width: "100%", height: "100%", padding: "20px" }}>
<view style={{ width: "100%", padding: "10px", backgroundColor: "#87654321", borderRadius: "10px" }}>
{
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead create IntrinsicElements['textarea']? It can be moved into @lynx-js/types in the future.

}}
>
{
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

}}
>
{
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.


<textarea
style={{ width: "100%" }}
placeholder=".textarea::placeholder {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: I don't think this would work with @lynx-js/react < 0.108. Since we just made the fix in lynx-family/lynx-stack#654

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"jsx": "preserve",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use "jsx": "react-jsx" instead.

Suggested change
"jsx": "preserve",
"jsx": "react-jsx",

@@ -0,0 +1,21 @@
{
"compilerOptions": {
"jsx": "preserve",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"jsx": "preserve",
"jsx": "react-jsx",

}}
>
{
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we instead create IntrinsicElements['input']? It can be moved into @lynx-js/types in the future.

I actually made one at

interface InputProps extends Lynx.StandardProps {

<view style={{ linearOrientation: "vertical", width: "100%", height: "100%", padding: "10px" }}>
<view style={{ width: "100%", padding: "10px", backgroundColor: "#12345678", borderRadius: "10px" }}>
{
// @ts-ignore
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

pluginTypeCheck(),
],
output: {
assetPrefix: "https://lynxjs.org/lynx-examples/list/dist",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assetPrefix: "https://lynxjs.org/lynx-examples/list/dist",
assetPrefix: "https://lynxjs.org/lynx-examples/input/dist",

pluginTypeCheck(),
],
output: {
assetPrefix: "https://lynxjs.org/lynx-examples/list/dist",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assetPrefix: "https://lynxjs.org/lynx-examples/list/dist",
assetPrefix: "https://lynxjs.org/lynx-examples/textarea/dist",

colinaaa added a commit that referenced this pull request Jun 5, 2025
colinaaa added a commit that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants