Skip to content

Instantly share code, notes, and snippets.

View rajatk16's full-sized avatar
🏠
Working from home

geekrajat rajatk16

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>CSS Selectors</title>
<meta charset="UTF-8" />
<link rel="stylesheet" type="text/css" href='./style.css'>
</head>
<body>
<nav id="main">
<ul>
import React, {Component} from 'react';
import PropTypes from 'prop-types'
import {defaultTo} from 'lodash';
class HideOrShow extends Component {
constructor(props) {
super(props);
this.state = {
isVisible: defaultTo(props.initialState, false),
};
import React from 'react';
import ReactDOM from 'react-dom';
import HideOrShow from './App';
function Display() {
return (
<HideOrShow>
{
({isVisible, hide, show}) => (
<div>
import React, {Component} from 'react';
import {connect} from 'react-redux';
import _ from 'lodash';
import * as actions from '../actions';
import ListItem from './ListItem';
class List extends Component {
state = {
showForm: false,
formValue: ""
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "icon1.png",
"sizes": "120x120",
"type": "image/png"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Understanding JavaScript Objects and Functions</title>
</head>
<body>
<script src="script.js"></script>
</body>
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import cx from 'classnames';
import './index.css';
class App extends Component {
state = {
display: false,
};
:root {
--toggler-width: 120px;
--toggler-height: 40px;
--toggler-bg-color: #da110a;
--toggler-active-bg-color: #08853c;
--menu-starting-top: 0px;
--menu-ending-top: 45px;
--menu-width: 200px;
--menu-max-height: 200px;
--menu-bg-color: #188ddb;
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import uuid from 'uuid';
import './index.css';
class App extends Component {
heroes = [
{
name: "Batman",
id: uuid(),
:root {
--timeout: 500ms;
--list-item-max-height: 30px;
}
ul {
margin: 0;
padding: 0 10px;
}