-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
73 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 4 additions & 11 deletions
15
packages/ui/src/ui/pages/query-tracker/NewQueryButton/NewQueryButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,12 @@ | ||
import * as React from 'react'; | ||
import {useDispatch} from 'react-redux'; | ||
import {Button} from '@gravity-ui/uikit'; | ||
import Icon from '../../../components/Icon/Icon'; | ||
import {resetQueryTracker} from '../module/query/actions'; | ||
|
||
export const NewQueryButton = () => { | ||
const dispatch = useDispatch(); | ||
|
||
const handleClick = () => { | ||
dispatch(resetQueryTracker()); | ||
}; | ||
|
||
export const NewQueryButton = ({onClick}: {onClick: () => void}) => { | ||
return ( | ||
<Button qa="new-query-btn" view="outlined" size="l" title="New query" onClick={handleClick}> | ||
<Icon awesome="plus" size={16} /> | ||
<Button qa="new-query-btn" view="outlined" size="l" title="New query" onClick={onClick}> | ||
<Icon awesome="file" size={16} /> | ||
New | ||
</Button> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
packages/ui/src/ui/pages/query-tracker/QueryTrackerTopRow/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 20 additions & 6 deletions
26
packages/ui/src/ui/pages/query-tracker/QueryWidget/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters