Skip to content

Commit

Permalink
Ekspanderer tiltak ved trykk på tiltakstekst
Browse files Browse the repository at this point in the history
* Ekspanderer tiltak ved trykk på tiltakstekst

* Fix linting
  • Loading branch information
hakonfro authored Dec 10, 2024
1 parent 9b13d9b commit 1f654e2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion plugins/ros/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Risk Scorecard (RiSc)

This is a plugin for Backstage that helps you and your team when working continuously with risk analysis (:))
This is a plugin for Backstage that helps you and your team when working continuously with risk analysis (:)
The plugin is dependent on a backend service in order to decrypt and communicate with GitHub, and some configuration is
necessary for them to communicate.

Expand Down
40 changes: 23 additions & 17 deletions plugins/ros/src/components/scenarioDrawer/components/ActionBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,33 @@ export const ActionBox = ({

return (
<Box>
<Box
sx={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
}}
>
<IconButton onClick={() => toggleActionExpanded(action.ID)}>
{isExpanded ? <ExpandLess /> : <ExpandMore />}
</IconButton>
<Typography
<Box sx={{ display: 'flex', flexDirection: 'row', alignItems: 'center' }}>
<Box
sx={{
fontSize: '16px',
fontWeight: 500,
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
cursor: 'pointer',
width: '100%',
}}
onClick={() => toggleActionExpanded(action.ID)}
>
{isActionTitlePresent
? action.title
: `${t('dictionary.measure')} ${index + 1}`}
</Typography>
<IconButton>
{isExpanded ? <ExpandLess /> : <ExpandMore />}
</IconButton>
<Typography
sx={{
fontSize: '16px',
fontWeight: 500,
}}
>
{isActionTitlePresent
? action.title
: `${t('dictionary.measure')} ${index + 1}`}
</Typography>
</Box>
<IconButton
disabled={isExpanded ? false : true}
sx={{
marginLeft: 'auto',
opacity: isExpanded ? 1 : 0,
Expand Down

0 comments on commit 1f654e2

Please sign in to comment.