-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
1 parent
3ed1f0b
commit e916b0f
Showing
4 changed files
with
50 additions
and
34 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 |
---|---|---|
@@ -1,18 +1,32 @@ | ||
import * as React from 'react'; | ||
import Input from '@mui/joy/Input'; | ||
import Stack from '@mui/joy/Stack'; | ||
|
||
export default function InputSlotProps() { | ||
const inputRef = React.useRef(null); | ||
return ( | ||
<Input | ||
type="number" | ||
defaultValue={2.5} | ||
slotProps={{ | ||
input: { | ||
min: 1, | ||
max: 5, | ||
step: 0.1, | ||
}, | ||
}} | ||
/> | ||
<Stack spacing={1.5} sx={{ minWidth: 300 }}> | ||
<Input | ||
type="number" | ||
defaultValue={2.5} | ||
slotProps={{ | ||
input: { | ||
ref: inputRef, | ||
min: 1, | ||
max: 5, | ||
step: 0.1, | ||
}, | ||
}} | ||
/> | ||
<Input | ||
type="date" | ||
slotProps={{ | ||
input: { | ||
min: '2018-06-07T00:00', | ||
max: '2018-06-14T00:00', | ||
}, | ||
}} | ||
/> | ||
</Stack> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,18 +1,32 @@ | ||
import * as React from 'react'; | ||
import Input from '@mui/joy/Input'; | ||
import Stack from '@mui/joy/Stack'; | ||
|
||
export default function InputSlotProps() { | ||
const inputRef = React.useRef<HTMLInputElement | null>(null); | ||
return ( | ||
<Input | ||
type="number" | ||
defaultValue={2.5} | ||
slotProps={{ | ||
input: { | ||
min: 1, | ||
max: 5, | ||
step: 0.1, | ||
}, | ||
}} | ||
/> | ||
<Stack spacing={1.5} sx={{ minWidth: 300 }}> | ||
<Input | ||
type="number" | ||
defaultValue={2.5} | ||
slotProps={{ | ||
input: { | ||
ref: inputRef, | ||
min: 1, | ||
max: 5, | ||
step: 0.1, | ||
}, | ||
}} | ||
/> | ||
<Input | ||
type="date" | ||
slotProps={{ | ||
input: { | ||
min: '2018-06-07T00:00', | ||
max: '2018-06-14T00:00', | ||
}, | ||
}} | ||
/> | ||
</Stack> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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