Skip to content

Commit d4ddb9c

Browse files
authored
docs(Form): add note about width calculation (#4733)
Closes #4668
1 parent 245a5dc commit d4ddb9c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/main/src/components/Form/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ const useStyles = createUseStyles(styles, { name: 'Form' });
102102
/**
103103
* The `Form` component arranges labels and fields into groups and rows. There are different ways to visualize forms for different screen sizes.
104104
* It is possible to change the alignment of all labels by setting the CSS `align-items` property, per default all labels are centered.
105+
*
106+
* __Note:__ The `Form` calculates its width based on the available space of its container. If the container also dynamically adjusts its width to its contents, you must ensure that you specify a fixed width, either for the container or for the `Form` itself. (e.g. when used inside a 'popover').
105107
*/
106108
const Form = forwardRef<HTMLFormElement, FormPropTypes>((props, ref) => {
107109
const {

0 commit comments

Comments
 (0)