This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$depth = 0; | |
echo '<ol class="tree">'; | |
foreach ($children as $i => $child) | |
{ | |
// Get the last and next nodes | |
$last = isset($children[$i-1]) ? $children[$i-1] : $children[0]; | |
$next = isset($children[$i+1]) ? $children[$i+1] : $children[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import createHoverMonitor from './createHoverMonitor'; | |
import { element, func, oneOfType } from 'prop-types'; | |
import React, { Component } from 'react'; | |
const hover = createHoverMonitor(); | |
/** | |
* Use: | |
* <Hoverable> | |
* {(hover) => <View style={hover && styles.hovered} />} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-inner-declarations */ | |
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment'; | |
let isEnabled = false; | |
if (canUseDOM) { | |
/** | |
* Web browsers emulate mouse events (and hover states) after touch events. | |
* This code infers when the currently-in-use modality supports hover | |
* (including for multi-modality devices) and considers "hover" to be enabled |