source: trip-planner-front/node_modules/istanbul-reports/lib/html-spa/src/flattenToggle.js@ e29cc2e

Last change on this file since e29cc2e was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 800 bytes
Line 
1const React = require('react');
2
3module.exports = function FlattenButton({ setIsFlat, isFlat }) {
4 return (
5 <div className="toggle">
6 <div className="toggle__label">Files:</div>
7 <div className="toggle__options">
8 <button
9 onClick={() => setIsFlat(!isFlat)}
10 className={
11 'toggle__option ' + (!isFlat ? 'is-toggled' : '')
12 }
13 >
14 Tree
15 </button>
16 <button
17 onClick={() => setIsFlat(!isFlat)}
18 className={'toggle__option ' + (isFlat ? 'is-toggled' : '')}
19 >
20 Flat
21 </button>
22 </div>{' '}
23 </div>
24 );
25};
Note: See TracBrowser for help on using the repository browser.