This file contains 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 React from 'react'; | |
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | |
import './toggle.css'; | |
export const Toggle = ({ darkMode, toggleDarkMode }) => { | |
return ( | |
<span id='dark_mode_toggle'> |
This file contains 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 React from 'react'; | |
import { Toggle } from '../Toggle' | |
import './Header.css'; | |
export const Header = ({ darkMode, toggleDarkMode }) => ( | |
<div id="header__container" > | |
<span>☰</span> {/*Placeholder for ACTUAL Hamburger Menu component*/} | |
<Toggle darkMode={darkMode} toggleDarkMode={toggleDarkMode} /> | |
<span role="img" aria-label="magnifying glass"> | |
🔍 {/* Placeholder for Search component */} |
This file contains 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 React from 'react'; | |
import App from './App'; | |
import { mount } from 'enzyme'; | |
test('toggle should be rendered', () => { | |
const wrapper = mount(<App/>); | |
const toggle = wrapper.find('#dark_mode_toggle'); | |
console.log(wrapper); | |
expect(toggle).to.have.lengthOf(1); |
This file contains 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 React, { useState } from 'react'; | |
import { Routes } from './routes'; | |
import { Header } from './components/Header'; | |
import { MobileNav } from './components/MobileNav'; | |
import './App.css'; | |
import { library } from '@fortawesome/fontawesome-svg-core' | |
import { faSun, faMoon,faCoffee } from '@fortawesome/free-solid-svg-icons' | |
library.add(faSun,faMoon,faCoffee) |
This file contains 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
/* | |
Write a function that takes in a Binary Search Tree (BST) and a target integer | |
value and returns the closest value to that target value contained in the BST. | |
Each BST node has an integer value , a | |
left child node, and a right child node. A node is | |
said to be a valid BST node if and only if it satisfies the BST | |
property: its value is strictly greater than the values of every | |
node to its left; its value is less than or equal to the values | |
of every node to its right; and its children nodes are either valid | |
BST nodes themselves or None/null. |