- Updated all component headers and documentation
- Changed navbar and footer branding
- Updated homepage hero badge
- Modified page title in index.html
- Simplified footer text to 'Built with ❤️'
- Consistent V2 capitalization across all references
11 lines
307 B
JavaScript
11 lines
307 B
JavaScript
import { correctNode } from './correctFocus';
|
|
export const pickFirstFocus = (nodes) => {
|
|
if (nodes[0] && nodes.length > 1) {
|
|
return correctNode(nodes[0], nodes);
|
|
}
|
|
return nodes[0];
|
|
};
|
|
export const pickFocusable = (nodes, node) => {
|
|
return nodes.indexOf(correctNode(node, nodes));
|
|
};
|