-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
188 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"props": {}, | ||
"name": "TextField", | ||
"imports": ["import { TextField } from '@base_ui/react/TextField';"], | ||
"classes": [], | ||
"spread": true, | ||
"themeDefaultProps": true, | ||
"muiName": "TextField", | ||
"forwardsRefTo": "HTMLInputElement", | ||
"filename": "/packages/mui-base/src/TextField/TextField.tsx", | ||
"inheritance": null, | ||
"demos": "<ul><li><a href=\"/components/react-text-field/\">Text Field</a></li></ul>", | ||
"cssComponent": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"props": {}, | ||
"name": "TextInput", | ||
"imports": ["import { TextInput } from '@base_ui/react/TextInput';"], | ||
"classes": [], | ||
"spread": true, | ||
"themeDefaultProps": true, | ||
"muiName": "TextInput", | ||
"forwardsRefTo": "HTMLInputElement", | ||
"filename": "/packages/mui-base/src/TextInput/TextInput.tsx", | ||
"inheritance": null, | ||
"demos": "<ul><li><a href=\"/components/react-text-input/\">Text Input</a></li></ul>", | ||
"cssComponent": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
docs/data/components/text-input/TextInputIntroduction/system/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use client'; | ||
import * as React from 'react'; | ||
import { TextInput as TextInputPrimitive } from '@base_ui/react/TextInput'; | ||
import { styled } from '@mui/system'; | ||
|
||
export default function TextFieldIntroduction() { | ||
return <TextInput />; | ||
} | ||
|
||
const TextInput = styled(TextInputPrimitive)` | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
padding: 8px; | ||
font-size: 16px; | ||
width: 200px; | ||
&:focus { | ||
outline: 0; | ||
border-color: #0070f3; | ||
} | ||
`; |
21 changes: 21 additions & 0 deletions
21
docs/data/components/text-input/TextInputIntroduction/system/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use client'; | ||
import * as React from 'react'; | ||
import { TextInput as TextInputPrimitive } from '@base_ui/react/TextInput'; | ||
import { styled } from '@mui/system'; | ||
|
||
export default function TextFieldIntroduction() { | ||
return <TextInput />; | ||
} | ||
|
||
const TextInput = styled(TextInputPrimitive)` | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
padding: 8px; | ||
font-size: 16px; | ||
width: 200px; | ||
&:focus { | ||
outline: 0; | ||
border-color: #0070f3; | ||
} | ||
`; |
1 change: 1 addition & 0 deletions
1
docs/data/components/text-input/TextInputIntroduction/system/index.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<TextInput /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
productId: base-ui | ||
title: React TextInput component | ||
description: Text Input is a UI element that lets users input single line text. | ||
components: TextInput | ||
githubLabel: 'component: text-input' | ||
packageName: '@base_ui/react' | ||
--- | ||
|
||
# Text Input | ||
|
||
<Description /> | ||
|
||
<ComponentLinkHeader design={false} /> | ||
|
||
<Demo demo="TextInputIntroduction" defaultCodeOpen="false" bg="gradient" /> | ||
|
||
## Installation | ||
|
||
<InstallationInstructions componentName="TextInput" /> | ||
|
||
## Anatomy | ||
|
||
`<TextInput />` renders an `<input>`, enhanced with field context when placed inside a [`Field`](/components/react-field/). | ||
|
||
```tsx | ||
<TextInput /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "componentDescription": "", "propDescriptions": {}, "classDescriptions": {} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as React from 'react'; | ||
import { TextInput } from '@base_ui/react/TextInput'; | ||
import { createRenderer } from '@mui/internal-test-utils'; | ||
import { describeConformance } from '../../test/describeConformance'; | ||
|
||
describe('<TextInput />', () => { | ||
const { render } = createRenderer(); | ||
|
||
describeConformance(<TextInput />, () => ({ | ||
refInstanceof: window.HTMLInputElement, | ||
render, | ||
})); | ||
}); |
Oops, something went wrong.