Skip to content

Commit

Permalink
Fix one more wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jayb committed Sep 26, 2024
1 parent 5acf6f2 commit cf0b98b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/components/DataTable/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import removeNullColumns from './helpers/removeNullColumns'
import { TableConfig } from './types/TableConfig'
import { Column } from '../../types/Column'
import { pivotData } from '../../helpers/pivotData'
import { isLegendWrapViewport } from '@cdc/core/helpers/viewports'

export type DataTableProps = {
applyLegendToRow?: Function
Expand Down Expand Up @@ -211,7 +212,7 @@ const DataTable = (props: DataTableProps) => {
const getMediaControlsClasses = belowTable => {
const classes = ['download-links']
if (!belowTable) {
const isLegendOnBottom = config?.legend?.position === 'bottom' || ['sm', 'xs', 'xxs'].includes(viewport)
const isLegendOnBottom = config?.legend?.position === 'bottom' || isLegendWrapViewport(viewport)
if (config.brush?.active && !isLegendOnBottom) classes.push('brush-active')
if (config.brush?.active && config.legend.hide) classes.push('brush-active')
} else {
Expand Down

0 comments on commit cf0b98b

Please sign in to comment.