Skip to content

Commit

Permalink
Merge pull request #114 from Chengxuan/fix-scroll-bar
Browse files Browse the repository at this point in the history
Fixing scroll direction for FFStateBox
  • Loading branch information
dechdev authored Jan 30, 2023
2 parents ba87d69 + e50e315 commit 6d6a428
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
10 changes: 3 additions & 7 deletions ui/src/components/Boxes/ContractStateBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,14 @@ export const ContractStateBox: React.FC = () => {
key={api.name}
>
{/* API Row */}
<Grid item xs={8} container pt={1}>
<HashPopover
address={`${SDK_PATHS.contractsApiByName(api.name)}`}
fullLength
paper
/>
<Grid item xs={10} container pt={1}>
<HashPopover address={`${api.name}`} fullLength paper />
</Grid>
<Grid
container
justifyContent="flex-end"
item
xs={4}
xs={2}
alignItems="center"
>
<DownloadButton filename={api.name} url={api.urls.openapi} />
Expand Down
16 changes: 13 additions & 3 deletions ui/src/components/Boxes/FFStateBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export const FFStateBox: React.FC<Props> = ({ header, children }) => {
sx={{
border: `3px solid ${theme.palette.background.paper}`,
borderRadius: DEFAULT_BORDER_RADIUS,
maxHeight: '250px',
overflow: 'auto',
}}
>
{/* Header */}
Expand All @@ -28,7 +26,19 @@ export const FFStateBox: React.FC<Props> = ({ header, children }) => {
{header}
</Typography>
</Grid>
{children}
<Grid
container
direction="column"
width="100%"
p={1}
sx={{
maxHeight: '222px',
overflow: 'auto',
flexWrap: 'nowrap',
}}
>
{children}
</Grid>
</Grid>
);
};
2 changes: 1 addition & 1 deletion ui/src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"apiID": "API ID",
"apiResponse": "API Response",
"apis": "APIs",
"apisKnownToFirefly": "APIs Known to FireFly",
"apisKnownToFirefly": "APIs known to current FireFly namespace",
"appCodeInstructions": "Build an action using the panels on the left. Click \"Run\" to execute the action via the backend server. FireFly events related to the transaction will appear on the right.",
"applicationCode": "Application Code",
"approvalID": "Approval ID",
Expand Down

0 comments on commit 6d6a428

Please sign in to comment.