fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Checkbox] Label text not wrapping properly

Open nikhilexe opened this issue 9 years ago • 1 comments

I see checkbox label text not wrapping properly, see below images with different experience with different version. With 4.9.2 version it was working fine and in between it got changed. Is this expected?

React Latest Version (4.24.0) (Not formatted Properly)

image

React Version ( 4.17.1) (Broken - Not showing Full Text)

image

React Version (4.9.2) (Expected)

image

Code Pen link: https://codepen.io/nikhilexe/pen/vJObEX

nikhilexe avatar Jul 27 '17 12:07 nikhilexe

Looks like the change in alignment occurred after this commit where Checkbox is now contained in a button, since button's default style is to center text https://github.com/OfficeDev/office-ui-fabric-react/commit/9440c73f17ce503100d8f908db0d44a5adac5b0a#diff-c67edd8cc40e32a606cf1597c95dad82

I believe it can be fixed by adding this style to Checkbox.styles.ts:

 label: {
           //...
           textAlign: 'left'
         }

erichdev avatar Jul 27 '17 22:07 erichdev