我有一个带有简短标题的React-Bootstrap面板,但内容可能很宽,例如:
<Panel>
<Panel.Heading>
<Panel.Title toggle>
Hello
</Panel.Title>
</Panel.Heading>
<Panel.Collapse>
<Panel.Body>
Really wide body. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</Panel.Body>
</Panel.Collapse>
</Panel>
折叠后这将导致Panel.Heading非常薄,但展开时会导致Panel.Heading非常宽,就像这样:
我的问题是,即使折叠了,如何使Panel.Heading的宽度与Panel.Body的宽度匹配?