yhtml5-test
Version:
A test framework for front-end projects
66 lines (57 loc) • 1.49 kB
JavaScript
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { red, redTransparent } from '../styles';
var navigationBarStyle = {
marginBottom: '0.5rem'
};
var buttonContainerStyle = {
marginRight: '1em'
};
var _navButtonStyle = {
backgroundColor: redTransparent,
color: red,
border: 'none',
borderRadius: '4px',
padding: '3px 6px',
cursor: 'pointer'
};
var leftButtonStyle = Object.assign({}, _navButtonStyle, {
borderTopRightRadius: '0px',
borderBottomRightRadius: '0px',
marginRight: '1px'
});
var rightButtonStyle = Object.assign({}, _navButtonStyle, {
borderTopLeftRadius: '0px',
borderBottomLeftRadius: '0px'
});
function NavigationBar(props) {
var currentError = props.currentError,
totalErrors = props.totalErrors,
previous = props.previous,
next = props.next;
return React.createElement(
'div',
{ style: navigationBarStyle },
React.createElement(
'span',
{ style: buttonContainerStyle },
React.createElement(
'button',
{ onClick: previous, style: leftButtonStyle },
'\u2190'
),
React.createElement(
'button',
{ onClick: next, style: rightButtonStyle },
'\u2192'
)
),
currentError + ' of ' + totalErrors + ' errors on the page'
);
}
export default NavigationBar;