Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
95a8a598
Commit
95a8a598
authored
Oct 31, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restored transition
parent
1a65046b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
public/app/core/components/Animations/SlideDown.tsx
+4
-2
public/app/features/api-keys/ApiKeysPage.tsx
+13
-7
No files found.
public/app/core/components/Animations/SlideDown.tsx
View file @
95a8a598
import
React
from
'react'
;
import
React
from
'react'
;
import
Transition
from
'react-transition-group/Transition'
;
interface
Style
{
...
...
@@ -6,9 +6,11 @@ interface Style {
overflow
?:
string
;
}
const
defaultMaxHeight
=
'200px'
;
// When animating using max-height we need to use a static value.
// When animating using max-height we need to use a static value.
// If this is not enough, pass in <SlideDown maxHeight="....
const
defaultMaxHeight
=
'200px'
;
const
defaultDuration
=
200
;
export
const
defaultStyle
:
Style
=
{
transition
:
`max-height
${
defaultDuration
}
ms ease-in-out`
,
overflow
:
'hidden'
,
...
...
public/app/features/api-keys/ApiKeysPage.tsx
View file @
95a8a598
...
...
@@ -8,7 +8,7 @@ import { getApiKeys, getApiKeysCount } from './state/selectors';
import
{
loadApiKeys
,
deleteApiKey
,
setSearchQuery
,
addApiKey
}
from
'./state/actions'
;
import
PageHeader
from
'app/core/components/PageHeader/PageHeader'
;
import
PageLoader
from
'app/core/components/PageLoader/PageLoader'
;
import
SlideDown
,
{
defaultStyle
as
slideDownDefaultStyle
}
from
'app/core/components/Animations/SlideDown'
;
import
SlideDown
from
'app/core/components/Animations/SlideDown'
;
import
ApiKeysAddedModal
from
'./ApiKeysAddedModal'
;
import
config
from
'app/core/config'
;
import
appEvents
from
'app/core/app_events'
;
...
...
@@ -85,6 +85,7 @@ export class ApiKeysPage extends PureComponent<Props, any> {
return
{
...
prevState
,
newApiKey
:
initialApiKeyState
,
isAdding
:
false
,
};
});
};
...
...
@@ -130,10 +131,9 @@ export class ApiKeysPage extends PureComponent<Props, any> {
renderAddApiKeyForm
()
{
const
{
newApiKey
,
isAdding
}
=
this
.
state
;
const
slideDownStyle
=
isAdding
?
slideDownDefaultStyle
:
{
...
slideDownDefaultStyle
,
transition
:
'unset'
};
return
(
<
SlideDown
in=
{
isAdding
}
style=
{
slideDownStyle
}
>
<
SlideDown
in=
{
isAdding
}
>
<
div
className=
"cta-form"
>
<
button
className=
"cta-form__close btn btn-transparent"
onClick=
{
this
.
onToggleAdding
}
>
<
i
className=
"fa fa-close"
/>
...
...
@@ -242,9 +242,15 @@ export class ApiKeysPage extends PureComponent<Props, any> {
return
(
<
div
>
<
PageHeader
model=
{
navModel
}
/>
{
hasFetched
?
(
apiKeysCount
>
0
?
this
.
renderApiKeyList
()
:
this
.
renderEmptyList
())
:
<
PageLoader
pageName=
"Api keys"
/>
}
{
hasFetched
?
(
apiKeysCount
>
0
?
(
this
.
renderApiKeyList
()
)
:
(
this
.
renderEmptyList
()
)
)
:
(
<
PageLoader
pageName=
"Api keys"
/>
)
}
</
div
>
);
}
...
...
@@ -256,7 +262,7 @@ function mapStateToProps(state) {
apiKeys
:
getApiKeys
(
state
.
apiKeys
),
searchQuery
:
state
.
apiKeys
.
searchQuery
,
apiKeysCount
:
getApiKeysCount
(
state
.
apiKeys
),
hasFetched
:
state
.
apiKeys
.
hasFetched
hasFetched
:
state
.
apiKeys
.
hasFetched
,
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment