Skip to content
Merged
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
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fix: Field should have block layout, not inline",
"packageName": "@fluentui/react-field",
"email": "behowell@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ export type FieldSlots<T extends FieldComponent> = {
root: NonNullable<Slot<'div'>>;
control: SlotComponent<T>;
label?: Slot<typeof Label>;
validationMessage?: Slot<'span'>;
validationMessage?: Slot<'div'>;
validationMessageIcon?: Slot<'span'>;
hint?: Slot<'span'>;
hint?: Slot<'div'>;
};

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export type FieldSlots<T extends FieldComponent> = {
/**
* A message about the validation state. The appearance of the `validationMessage` depends on `validationState`.
*/
validationMessage?: Slot<'span'>;
validationMessage?: Slot<'div'>;

/**
* The icon associated with the `validationMessage`. If the `validationState` prop is set, this will default to an
Expand All @@ -48,7 +48,7 @@ export type FieldSlots<T extends FieldComponent> = {
/**
* Additional hint text below the field.
*/
hint?: Slot<'span'>;
hint?: Slot<'div'>;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ export const useField_unstable = <T extends FieldComponent>(
root: 'div',
control: params.component,
label: Label,
validationMessage: 'span',
validationMessage: 'div',
validationMessageIcon: 'span',
hint: 'span',
hint: 'div',
},
root,
control,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getFieldClassNames = (name: string): SlotClassNames<FieldSlots<Fiel
*/
const useRootStyles = makeStyles({
base: {
display: 'inline-grid',
display: 'grid',
gridAutoFlow: 'row',
justifyItems: 'start',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InputField } from '@fluentui/react-field';

const useStyles = makeStyles({
stack: {
display: 'inline-grid',
display: 'grid',
rowGap: tokens.spacingVerticalM,
width: '400px',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { InputField } from '@fluentui/react-field';

const useStyles = makeStyles({
stack: {
display: 'inline-grid',
display: 'grid',
rowGap: tokens.spacingVerticalM,
width: '400px',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { SparkleFilled } from '@fluentui/react-icons';

const useStyles = makeStyles({
stack: {
display: 'inline-grid',
display: 'grid',
rowGap: tokens.spacingVerticalM,
width: '400px',
},
Expand Down