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
2be4d8df
Unverified
Commit
2be4d8df
authored
Feb 12, 2020
by
Ivana Huckova
Committed by
GitHub
Feb 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explore: Refactor active buttons css (#22124)
parent
ef362765
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
32 deletions
+20
-32
packages/grafana-ui/src/components/TimePicker/TimePicker.tsx
+1
-14
public/app/features/explore/LiveTailButton.tsx
+2
-2
public/app/features/explore/TimeSyncButton.tsx
+1
-14
public/app/features/explore/__snapshots__/TimeSyncButton.test.tsx.snap
+1
-1
public/sass/pages/_explore.scss
+15
-1
No files found.
packages/grafana-ui/src/components/TimePicker/TimePicker.tsx
View file @
2be4d8df
...
@@ -69,19 +69,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
...
@@ -69,19 +69,6 @@ const getStyles = stylesFactory((theme: GrafanaTheme) => {
font-size:
${
theme
.
typography
.
size
.
md
}
;
font-size:
${
theme
.
typography
.
size
.
md
}
;
}
}
`
,
`
,
syncedTimePicker
:
css
`
label: syncedTimePicker;
border-color:
${
theme
.
colors
.
orangeDark
}
;
background-image: none;
background-color: transparent;
color:
${
theme
.
colors
.
orangeDark
}
;
&:focus,
:hover {
color:
${
theme
.
colors
.
orangeDark
}
;
background-image: none;
background-color: transparent;
}
`
,
noRightBorderStyle
:
css
`
noRightBorderStyle
:
css
`
label: noRightBorderStyle;
label: noRightBorderStyle;
border-right: 0;
border-right: 0;
...
@@ -160,7 +147,7 @@ export class UnthemedTimePicker extends PureComponent<Props, State> {
...
@@ -160,7 +147,7 @@ export class UnthemedTimePicker extends PureComponent<Props, State> {
const
timePickerIconClass
=
cx
(
'fa fa-clock-o fa-fw'
,
{
[
'icon-brand-gradient'
]:
syncedTimePicker
});
const
timePickerIconClass
=
cx
(
'fa fa-clock-o fa-fw'
,
{
[
'icon-brand-gradient'
]:
syncedTimePicker
});
const
timePickerButtonClass
=
cx
(
'btn navbar-button navbar-button--tight'
,
{
const
timePickerButtonClass
=
cx
(
'btn navbar-button navbar-button--tight'
,
{
[
`btn--radius-right-0
${
styles
.
noRightBorderStyle
}
`
]:
!!
timeSyncButton
,
[
`btn--radius-right-0
${
styles
.
noRightBorderStyle
}
`
]:
!!
timeSyncButton
,
[
`explore-active-button
-glow
${
styles
.
syncedTimePicker
}
`
]:
syncedTimePicker
,
[
`explore-active-button`
]:
syncedTimePicker
,
});
});
return
(
return
(
...
...
public/app/features/explore/LiveTailButton.tsx
View file @
2be4d8df
...
@@ -124,7 +124,7 @@ export function LiveTailButton(props: LiveTailButtonProps) {
...
@@ -124,7 +124,7 @@ export function LiveTailButton(props: LiveTailButtonProps) {
<
ResponsiveButton
<
ResponsiveButton
splitted=
{
splitted
}
splitted=
{
splitted
}
buttonClassName=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
buttonClassName=
{
classNames
(
'btn navbar-button'
,
styles
.
liveButton
,
{
[
`btn--radius-right-0 explore-active-button
-glow
${styles.noRightBorderStyle}`
]:
isLive
,
[
`btn--radius-right-0 explore-active-button ${styles.noRightBorderStyle}`
]:
isLive
,
[
styles
.
isLive
]:
isLive
&&
!
isPaused
,
[
styles
.
isLive
]:
isLive
&&
!
isPaused
,
[
styles
.
isPaused
]:
isLive
&&
isPaused
,
[
styles
.
isPaused
]:
isLive
&&
isPaused
,
})
}
})
}
...
@@ -151,7 +151,7 @@ export function LiveTailButton(props: LiveTailButtonProps) {
...
@@ -151,7 +151,7 @@ export function LiveTailButton(props: LiveTailButtonProps) {
>
>
<
div
>
<
div
>
<
button
<
button
className=
{
`btn navbar-button navbar-button--attached explore-active-button
-glow
${styles.isLive}`
}
className=
{
`btn navbar-button navbar-button--attached explore-active-button ${styles.isLive}`
}
onClick=
{
stop
}
onClick=
{
stop
}
>
>
<
i
className=
{
classNames
(
'fa fa-stop icon-brand-gradient'
)
}
/>
<
i
className=
{
classNames
(
'fa fa-stop icon-brand-gradient'
)
}
/>
...
...
public/app/features/explore/TimeSyncButton.tsx
View file @
2be4d8df
...
@@ -7,19 +7,6 @@ import { GrafanaTheme } from '@grafana/data';
...
@@ -7,19 +7,6 @@ import { GrafanaTheme } from '@grafana/data';
const
getStyles
=
stylesFactory
((
theme
:
GrafanaTheme
)
=>
{
const
getStyles
=
stylesFactory
((
theme
:
GrafanaTheme
)
=>
{
return
{
return
{
timePickerSynced
:
css
`
label: timePickerSynced;
border-color:
${
theme
.
colors
.
orangeDark
}
;
background-image: none;
background-color: transparent;
color:
${
theme
.
colors
.
orangeDark
}
;
&:focus,
:hover {
color:
${
theme
.
colors
.
orangeDark
}
;
background-image: none;
background-color: transparent;
}
`
,
noRightBorderStyle
:
css
`
noRightBorderStyle
:
css
`
label: noRightBorderStyle;
label: noRightBorderStyle;
border-right: 0;
border-right: 0;
...
@@ -55,7 +42,7 @@ export function TimeSyncButton(props: TimeSyncButtonProps) {
...
@@ -55,7 +42,7 @@ export function TimeSyncButton(props: TimeSyncButtonProps) {
<
Tooltip
content=
{
syncTimesTooltip
}
placement=
"bottom"
>
<
Tooltip
content=
{
syncTimesTooltip
}
placement=
"bottom"
>
<
button
<
button
className=
{
classNames
(
'btn navbar-button navbar-button--attached'
,
{
className=
{
classNames
(
'btn navbar-button navbar-button--attached'
,
{
[
`explore-active-button
-glow ${styles.timePickerSynced}
`
]:
isSynced
,
[
`explore-active-button`
]:
isSynced
,
})
}
})
}
aria
-
label=
{
isSynced
?
'Synced times'
:
'Unsynced times'
}
aria
-
label=
{
isSynced
?
'Synced times'
:
'Unsynced times'
}
onClick=
{
()
=>
onClick
()
}
onClick=
{
()
=>
onClick
()
}
...
...
public/app/features/explore/__snapshots__/TimeSyncButton.test.tsx.snap
View file @
2be4d8df
...
@@ -15,7 +15,7 @@ exports[`TimeSyncButton should render component 1`] = `
...
@@ -15,7 +15,7 @@ exports[`TimeSyncButton should render component 1`] = `
>
>
<button
<button
aria-label="Synced times"
aria-label="Synced times"
className="btn navbar-button navbar-button--attached explore-active-button
-glow css-1tn4rnx-timePickerSynced
"
className="btn navbar-button navbar-button--attached explore-active-button"
onClick={[Function]}
onClick={[Function]}
onMouseEnter={[Function]}
onMouseEnter={[Function]}
onMouseLeave={[Function]}
onMouseLeave={[Function]}
...
...
public/sass/pages/_explore.scss
View file @
2be4d8df
...
@@ -22,8 +22,22 @@
...
@@ -22,8 +22,22 @@
}
}
}
}
.explore-active-button
-glow
{
.explore-active-button
{
box-shadow
:
$btn-active-box-shadow
;
box-shadow
:
$btn-active-box-shadow
;
border-color
:
$orange-dark
;
background-image
:
none
;
background-color
:
transparent
;
color
:
$orange-dark
!
important
;
&
:focus
{
background-color
:
transparent
;
}
i
{
text-shadow
:
none
;
background
:
linear-gradient
(
180deg
,
#f05a28
30%
,
#fbca0a
100%
);
background-clip
:
text
;
-webkit-text-fill-color
:
transparent
;
-moz-text-fill-color
:
transparent
;
}
}
}
.explore-ds-picker
{
.explore-ds-picker
{
min-width
:
200px
;
min-width
:
200px
;
...
...
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