I have the following code (with "@fluentui/react": "^8.33.0",
)
import React from 'react';
import { Toggle } from '@fluentui/react/lib/Toggle';
class TestIt extends React.Component {
render() {
return (
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
<Toggle onText="Width Limit Auto" offText="Width Limit Manual"/>
</div>
)
}
}
export default TestIt;
It has the following result where the label text is wrapped. If I remove display: 'flex', flexWrap: 'wrap'
, the label text is not wrapped.
I don't want to wrap the label text; I don't understand why display: 'flex', flexWrap: 'wrap'
(for some reason / other code, I need to keep it) has an effect on that.
For instance, there is no problem with codepen: https://codepen.io/SoftTimur/pen/JjJaRvv.
Could anyone help?