Skip to content

Commit

Permalink
added display as grid (#37146)
Browse files Browse the repository at this point in the history
  • Loading branch information
wewakekumar committed May 9, 2023
1 parent 3ed1f0b commit e916b0f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 34 deletions.
36 changes: 25 additions & 11 deletions docs/data/joy/components/input/InputSlotProps.js
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>
);
}
36 changes: 25 additions & 11 deletions docs/data/joy/components/input/InputSlotProps.tsx
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>
);
}
11 changes: 0 additions & 11 deletions docs/data/joy/components/input/InputSlotProps.tsx.preview

This file was deleted.

1 change: 0 additions & 1 deletion packages/mui-joy/src/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export const StyledInputHtml = styled('input')<{ ownerState: InputOwnerState }>(
outline: 0, // remove the native input outline
padding: 0, // remove the native input padding
flex: 1,
alignSelf: 'stretch',
color: 'inherit',
backgroundColor: 'transparent',
fontFamily: 'inherit',
Expand Down

0 comments on commit e916b0f

Please sign in to comment.