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 React from 'react'; | |
| import Card from '../Components/Card'; | |
| import data from '../Data/drinks.json'; | |
| import Preparation from '../Pages/Preparation'; | |
| import { Link } from 'react-router-dom'; | |
| import _, { update } from 'lodash'; | |
| function searchingFor(search) { | |
| return function(cocktails) { | |
| return cocktails.name.toLowerCase().includes(search.toLowerCase()) || !search; |
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
| h1 { | |
| font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; | |
| font-size: 24px; | |
| font-style: normal; | |
| font-variant: normal; | |
| font-weight: 700; | |
| line-height: 26.4px; | |
| } | |
| h3 { |
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
| { | |
| "fruit": "Apple", | |
| "size": "Large", | |
| "color": "Red" | |
| } |
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 React from 'react'; | |
| import { BrowserRouter as Router, Link, Route, Switch, useParams, useRouteMatch } from 'react-router-dom'; | |
| // To render the sublist only when one of the routes inside is active ? | |
| export default function App() { | |
| const pages = { | |
| termsPage: [ | |
| { name: 'First Page', path: '/one/two' }, | |
| { |
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 React from 'react'; | |
| import { BrowserRouter as Router, Link, Route, Switch, useParams, useRouteMatch } from 'react-router-dom'; | |
| export default function App() { | |
| return ( | |
| <Router> | |
| <div> | |
| <nav> | |
| <ul> | |
| <li> |
This file has been truncated, but you can view the full file.
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
| html { | |
| touch-action: none; } | |
| body { | |
| font-size: 24px; | |
| margin: 0; | |
| width: 100%; | |
| touch-action: none; } | |
| .main { |
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
| window.onload = function() { | |
| Sass.compile(document.querySelector("style[type=scss]").innerHTML, function(css) { | |
| var st = document.createElement("style") | |
| st.innerHTML = css.text; | |
| css.formatted && console.log(css.formatted); // error log | |
| css.text && document.head.appendChild(st); // add css to style | |
| document.body.style.display = "block"; // turn on body | |
| // console.log(css.text) // log css out | |
| }); | |
| } |
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 User { | |
| constructor(name) { | |
| this.name = name; | |
| } | |
| sayHi() { | |
| alert(this.name); | |
| } | |
| } |
NewerOlder