Skip to content

Commit 61a2dae

Browse files
fix(overmind-devtools): fix scrolling of action
1 parent 367c28c commit 61a2dae

File tree

4 files changed

+26
-27
lines changed

4 files changed

+26
-27
lines changed

packages/node_modules/overmind-devtools/src/components/Action/elements.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled from '../../styled-components'
33
export const Wrapper = styled.div`
44
padding: ${({ theme }) => theme.padding.normal};
55
background-color: ${({ theme }) => theme.color.fade(theme.color.white, 0.1)};
6+
overflow-y: scroll;
67
`
78

89
export const Container = styled.div`
@@ -14,3 +15,20 @@ export const Pipe = styled.div`
1415
align-items: center;
1516
margin: ${({ theme }) => `${theme.padding.small} 0`};
1617
`
18+
19+
export const ExpandAll = styled<
20+
{
21+
isActive: boolean
22+
},
23+
'div'
24+
>('div')`
25+
display: flex;
26+
justify-content: flex-end;
27+
font-size: ${({ theme }) => theme.fontSize.small};
28+
cursor: pointer;
29+
color: ${({ theme }) => theme.color.black};
30+
opacity: ${({ isActive }) => (isActive ? '1' : '0.5')};
31+
:hover {
32+
opacity: ${({ isActive }) => (isActive ? '1' : '0.75')};
33+
}
34+
`

packages/node_modules/overmind-devtools/src/components/Action/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import { Connect, connect } from '../../app'
3-
import { Wrapper, Container } from './elements'
3+
import { Wrapper, Container, ExpandAll } from './elements'
44
import Operator from '../ActionOperator'
55
import Flush from '../ActionFlush'
66
import { getActionId, getOperatorId } from '../../app/utils'
@@ -16,6 +16,12 @@ const Action: React.SFC<Connect> = ({ app }) => {
1616
return (
1717
<Wrapper>
1818
<Container>
19+
<ExpandAll
20+
isActive={app.state.expandAllActionDetails}
21+
onClick={() => app.actions.toggleExpandAllActions()}
22+
>
23+
expand all
24+
</ExpandAll>
1925
{app.state.currentAction.operators.map((operator, index) => {
2026
const prevOperator = app.state.currentAction.operators[index - 1]
2127
const value =

packages/node_modules/overmind-devtools/src/components/Actions/elements.tsx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,3 @@ export const CenterWrapper = styled.div`
1818
align-items: center;
1919
justify-content: center;
2020
`
21-
22-
export const ExpandAll = styled<
23-
{
24-
isActive: boolean
25-
},
26-
'div'
27-
>('div')`
28-
display: flex;
29-
position: absolute;
30-
top: 10px;
31-
right: ${({ theme }) => theme.padding.normal};
32-
font-size: ${({ theme }) => theme.fontSize.small};
33-
cursor: pointer;
34-
color: ${({ theme }) => theme.color.black};
35-
opacity: ${({ isActive }) => (isActive ? '1' : '0.5')};
36-
:hover {
37-
opacity: ${({ isActive }) => (isActive ? '1' : '0.75')};
38-
}
39-
`

packages/node_modules/overmind-devtools/src/components/Actions/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react'
22
import ActionsList from '../ActionsList'
33
import Action from '../Action'
4-
import { Wrapper, CenterWrapper, ExpandAll } from './elements'
4+
import { Wrapper, CenterWrapper } from './elements'
55
import { Connect, connect } from '../../app'
66
import Text from '../common/Text'
77

@@ -16,12 +16,6 @@ const Actions: React.SFC<Connect> = ({ app }) => {
1616

1717
return (
1818
<Wrapper>
19-
<ExpandAll
20-
isActive={app.state.expandAllActionDetails}
21-
onClick={() => app.actions.toggleExpandAllActions()}
22-
>
23-
expand all
24-
</ExpandAll>
2519
<ActionsList />
2620
<Action />
2721
</Wrapper>

0 commit comments

Comments
 (0)