-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add remove show only changed button to get started screen
- Loading branch information
1 parent
ffe8bc4
commit ff8e2c8
Showing
1 changed file
with
25 additions
and
7 deletions.
There are no files selected for viewing
32 changes: 25 additions & 7 deletions
32
webview/src/experiments/components/emptyState/AddColumns.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,10 +1,28 @@ | ||
import React from 'react' | ||
import { useSelector } from 'react-redux' | ||
import { selectColumns, toggleShowOnlyChanged } from '../../util/messages' | ||
import { ExperimentsState } from '../../store' | ||
import { StartButton } from '../../../shared/components/button/StartButton' | ||
import { selectColumns } from '../../util/messages' | ||
import { IconButton } from '../../../shared/components/button/IconButton' | ||
import { Close } from '../../../shared/components/icons' | ||
|
||
export const AddColumns: React.FC = () => ( | ||
<div> | ||
<p>No Columns Selected.</p> | ||
<StartButton onClick={selectColumns} text="Add Columns" /> | ||
</div> | ||
) | ||
export const AddColumns: React.FC = () => { | ||
const showOnlyChanged = useSelector( | ||
(state: ExperimentsState) => state.tableData.showOnlyChanged | ||
) | ||
return ( | ||
<div> | ||
<p>No Columns Selected.</p> | ||
<StartButton onClick={selectColumns} text="Add Columns" /> | ||
{showOnlyChanged && ( | ||
<IconButton | ||
icon={Close} | ||
appearance="secondary" | ||
isNested={true} | ||
onClick={toggleShowOnlyChanged} | ||
text="Show Only Changed" | ||
/> | ||
)} | ||
</div> | ||
) | ||
} |