-
Notifications
You must be signed in to change notification settings - Fork 300
Open
Description
The new list-item DropIndicator is (I assume) designed to get its instructions from the list-item hitbox, which provides a complete Instruction
object. However, the Instruction
type makes it more awkward to use directly (apart from the hitbox):
export type Instruction = {
[TOperation in Operation]: {
operation: TOperation;
blocked: boolean;
axis: Axis;
};
}[Operation];
return <DropIndicator instruction={{ type: 'combine', axis: 'vertical', blocked: false }} />;
Could the types be relaxed to provide more defaults?
export type Instruction = {
[TOperation in Operation]: {
operation: TOperation;
blocked?: boolean; // defaults to false
axis?: Axis; // defaults to 'vertical', just like hitbox
};
}[Operation];
return <DropIndicator instruction={{ type: 'combine' }} />;
Metadata
Metadata
Assignees
Labels
No labels