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 PropTypes from 'prop-types'; | |
import React from 'react'; | |
import { hasFeature, hasPermission } from 'lib/auth'; | |
import { Route, Redirect } from 'react-router-dom'; | |
class RestrictedRoute extends React.Component { | |
static propTypes = { | |
component: PropTypes.func, | |
features: PropTypes.array, | |
permissions: PropTypes.array |
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 queryString from 'query-string' | |
import Immutable from 'seamless-immutable' | |
/** | |
* API Client | |
* Vision-specific client for interacting directly with the API – via these methods. | |
* | |
* @type {Object} | |
*/ | |
const apiClient = { |
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
@keyframes(bulge) { | |
0% { font-size: ms(-1) } | |
30% { font-size: ms(3) } | |
100% { font-size: ms(0) } | |
} | |
.class { | |
animation: bulge $transition-speed-easing infinite; | |
} |
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
.class { | |
transition: color $transition-speed-easing; // preferred method | |
} | |
.class { | |
transition: opacity ($transition-speed * 2) $transition-easing; // For a slower animation | |
} | |
.class { | |
transition: color $transition-speed-easing, // multiple properties |