Skip to content

Commit

Permalink
add remove show only changed button to get started screen
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Aug 2, 2023
1 parent ffe8bc4 commit ff8e2c8
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions webview/src/experiments/components/emptyState/AddColumns.tsx
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>
)
}

0 comments on commit ff8e2c8

Please sign in to comment.