Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ export const WithAppearanceOverride = () => (
</FluentProvider>
);
WithAppearanceOverride.storyName = 'With appearance override';

export const ShrinkToWrapper = () => (
<div style={{ maxWidth: '50px' }}>
<div style={{ display: 'grid' }}>
<Input defaultValue="Some text that extends past the default size of 20 characters" />
</div>
</div>
);
ShrinkToWrapper.storyName = 'Shrink to wrapper';
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: Input shrinks to its wrapper past the browser default of size=20",
"packageName": "@fluentui/react-input",
"email": "sarah.higley@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const useInput_unstable = (props: InputProps, ref: React.Ref<HTMLInputEle
input: slot.always(props.input, {
defaultProps: {
type: 'text',
size: 1,
ref,
...nativeProps.primary,
},
Expand Down
Loading