chore: update LabelConfig name, add to store, create a11y example
This commit is contained in:
@@ -36,3 +36,12 @@ export const infiniteExtent: CoordinateExtent = [
|
||||
];
|
||||
|
||||
export const elementSelectionKeys = ['Enter', ' ', 'Escape'];
|
||||
|
||||
export const defaultLabelConfig = {
|
||||
'a11yDescription.node.default':
|
||||
'Press enter or space to select a node. Press delete to remove it and escape to cancel.',
|
||||
'a11yDescription.node.keyboardDisabled':
|
||||
'Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.',
|
||||
'a11yDescription.edge.default':
|
||||
'Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.',
|
||||
};
|
||||
|
||||
@@ -314,7 +314,7 @@ export type OnBeforeDeleteBase<NodeType extends NodeBase = NodeBase, EdgeType ex
|
||||
edges: EdgeType[];
|
||||
}) => Promise<boolean | { nodes: NodeType[]; edges: EdgeType[] }>;
|
||||
|
||||
export type descriptions = {
|
||||
export type LabelConfig = {
|
||||
'a11yDescription.node.default'?: string;
|
||||
'a11yDescription.node.keyboardDisabled'?: string;
|
||||
'a11yDescription.edge.default'?: string;
|
||||
|
||||
Reference in New Issue
Block a user