move icon to right side (#1185)

Co-authored-by: Leon <>
This commit is contained in:
leon-up9
2022-07-05 16:35:03 +03:00
committed by GitHub
parent ec11b21b51
commit d857935889
2 changed files with 8 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ export const AutoRepresentation: React.FC<any> = ({ representation, color, opene
const arr = [ const arr = [
{ {
tab: 'Request', tab: 'Request',
badge: isReplayDisplayed() && <span title="Replay Request"><ReplayIcon fill={color} stroke={color} style={{ marginLeft: "10px", cursor: "pointer", height: "22px" }} onClick={() => setIsOpenRequestModal(true)} /></span> badge: null
}] }]
if (response) { if (response) {
@@ -40,7 +40,7 @@ export const AutoRepresentation: React.FC<any> = ({ representation, color, opene
} }
return arr return arr
}, [color, isReplayDisplayed, response, setIsOpenRequestModal]); }, [response]);
const [currentTab, setCurrentTab] = useState(TABS[0].tab); const [currentTab, setCurrentTab] = useState(TABS[0].tab);
@@ -66,6 +66,7 @@ export const AutoRepresentation: React.FC<any> = ({ representation, color, opene
{<div className={styles.body}> {<div className={styles.body}>
<div className={styles.bodyHeader}> <div className={styles.bodyHeader}>
<Tabs tabs={TABS} currentTab={currentTab} color={color} onChange={setCurrentTab} leftAligned /> <Tabs tabs={TABS} currentTab={currentTab} color={color} onChange={setCurrentTab} leftAligned />
{isReplayDisplayed() && <span title="Replay Request"><ReplayIcon fill={color} stroke={color} style={{ marginLeft: "10px", cursor: "pointer", height: "22px" }} onClick={() => setIsOpenRequestModal(true)} /></span>}
</div> </div>
{getOpenedTabIndex() === TabsEnum.Request && <React.Fragment> {getOpenedTabIndex() === TabsEnum.Request && <React.Fragment>
<SectionsRepresentation data={request} color={color} requestRepresentation={request} /> <SectionsRepresentation data={request} color={color} requestRepresentation={request} />

View File

@@ -52,8 +52,13 @@
border-radius: 4px border-radius: 4px
padding: 10px padding: 10px
position: relative position: relative
.bodyHeader .bodyHeader
padding: 0 1rem padding: 0 1rem
display: flex
align-items: center
justify-content: space-between
.endpointURL .endpointURL
font-size: .75rem font-size: .75rem
display: block display: block