Skip to content

Commit

Permalink
remove marks
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Aug 13, 2024
1 parent a29ca40 commit 4f1673a
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions packages/dataviews/src/dataviews-layouts/grid/density-picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { RangeControl } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { useViewportMatch } from '@wordpress/compose';
import { useEffect, useMemo } from '@wordpress/element';
import { useEffect } from '@wordpress/element';

const viewportBreaks = {
xhuge: { min: 3, max: 6, default: 5 },
Expand Down Expand Up @@ -39,7 +39,6 @@ function useViewPortBreakpoint() {
return null;
}


export default function DensityPicker( {
density,
setDensity,
Expand All @@ -66,19 +65,6 @@ export default function DensityPicker( {
const breakValues = viewportBreaks[ viewport || 'mobile' ];
const densityToUse = density || breakValues.default;

const marks = useMemo(
() =>
Array.from(
{ length: breakValues.max - breakValues.min + 1 },
( _, i ) => {
return {
value: breakValues.min + i,
};
}
),
[ breakValues ]
);

if ( ! viewport ) {
return null;
}
Expand All @@ -93,7 +79,6 @@ export default function DensityPicker( {
value={ densityToUse }
min={ breakValues.min }
max={ breakValues.max }
marks={ marks }
withInputField={ false }
onChange={ ( value = 0 ) => {
setDensity( value );
Expand Down

0 comments on commit 4f1673a

Please sign in to comment.