Skip to content

Commit

Permalink
fix(filters): Add icon for group property filters (#24762)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Twixes and github-actions[bot] authored Sep 4, 2024
1 parent 0c62586 commit dccb835
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
import { IconPerson } from '@posthog/icons'
import { IconBuilding, IconPerson } from '@posthog/icons'
import { IconCohort, IconUnverifiedEvent } from 'lib/lemon-ui/icons'
import { Tooltip } from 'lib/lemon-ui/Tooltip'

import { PropertyFilterType } from '~/types'

export function PropertyFilterIcon({ type }: { type?: PropertyFilterType }): JSX.Element {
let iconElement = <></>
export function PropertyFilterIcon({ type }: { type?: PropertyFilterType }): JSX.Element | null {
switch (type) {
case 'event':
iconElement = (
return (
<Tooltip title="Event property">
<IconUnverifiedEvent />
</Tooltip>
)
break
case 'person':
iconElement = (
return (
<Tooltip title="Person property">
<IconPerson />
</Tooltip>
)
break
case 'cohort':
iconElement = (
return (
<Tooltip title="Cohort filter">
<IconCohort />
</Tooltip>
)
break
case 'group':
return (
<Tooltip title="Group filter">
<IconBuilding />
</Tooltip>
)
default:
return null
}
return iconElement
}

0 comments on commit dccb835

Please sign in to comment.