@@ -2,9 +2,8 @@ import React, { type ReactElement } from 'react';
2
2
3
3
import type { Instruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item' ;
4
4
5
- import { Line } from './internal/line' ;
6
- import { Outline } from './internal/outline' ;
7
- import { presetStrokeColors } from './presets' ;
5
+ import { DropIndicator as Border } from './border' ;
6
+ import { DropIndicator as Line } from './box' ;
8
7
9
8
export type DropIndicatorProps = {
10
9
instruction : Instruction ;
@@ -18,22 +17,22 @@ function getElement({
18
17
isBlocked : boolean ;
19
18
} ) : ReactElement | null {
20
19
const indent = `${ instruction . currentLevel * instruction . indentPerLevel } px` ;
21
- const strokeColor = presetStrokeColors [ ! isBlocked ? 'default ' : 'warning' ] ;
20
+ const appearance = isBlocked ? 'warning ' : 'default' ;
22
21
23
22
if ( instruction . type === 'reorder-above' ) {
24
- return < Line edge = "top" strokeColor = { strokeColor } indent = { indent } /> ;
23
+ return < Line edge = "top" appearance = { appearance } indent = { indent } /> ;
25
24
}
26
25
if ( instruction . type === 'reorder-below' ) {
27
- return < Line edge = "bottom" strokeColor = { strokeColor } indent = { indent } /> ;
26
+ return < Line edge = "bottom" appearance = { appearance } indent = { indent } /> ;
28
27
}
29
28
30
29
if ( instruction . type === 'make-child' ) {
31
- return < Outline strokeColor = { strokeColor } indent = { indent } /> ;
30
+ return < Border appearance = { appearance } indent = { indent } /> ;
32
31
}
33
32
34
33
if ( instruction . type === 'reparent' ) {
35
34
const reparentIndent = `${ instruction . desiredLevel * instruction . indentPerLevel } px` ;
36
- return < Line edge = "bottom" strokeColor = { strokeColor } indent = { reparentIndent } /> ;
35
+ return < Line edge = "bottom" appearance = { appearance } indent = { reparentIndent } /> ;
37
36
}
38
37
39
38
return null ;
0 commit comments