Introduce button to copy request / response body to clipboard
Summary: Changelog: [Network] Introduce a copy button for request / response bodies Reviewed By: passy Differential Revision: D28222152 fbshipit-source-id: db33c8e91cbbe733502b32df75de14290e6f3d95
This commit is contained in:
committed by
Facebook GitHub Bot
parent
72e34bbd0d
commit
9c5967caf9
@@ -28,6 +28,7 @@ export const Panel: React.FC<{
|
||||
collapsed?: boolean;
|
||||
pad?: Spacing;
|
||||
gap?: Spacing;
|
||||
extraActions?: React.ReactElement | null;
|
||||
}> = (props) => {
|
||||
const [collapsed, setCollapsed] = useLocalStorageState(
|
||||
`panel:${props.title}:collapsed`,
|
||||
@@ -49,7 +50,16 @@ export const Panel: React.FC<{
|
||||
onChange={toggle}>
|
||||
<Collapse.Panel
|
||||
key={props.title}
|
||||
header={props.title}
|
||||
header={
|
||||
props.extraActions ? (
|
||||
<Layout.Right center>
|
||||
<span>{props.title}</span>
|
||||
{props.extraActions}
|
||||
</Layout.Right>
|
||||
) : (
|
||||
props.title
|
||||
)
|
||||
}
|
||||
showArrow={props.collapsible !== false}>
|
||||
<Layout.Container pad={props.pad} gap={props.pad}>
|
||||
{props.children}
|
||||
|
||||
Reference in New Issue
Block a user