Skip to content

Instantly share code, notes, and snippets.

View vadamk's full-sized avatar

Volodymyr Kravchuk vadamk

View GitHub Profile
#mapRoot {
display: flex;
flex-wrap: wrap;
}
#sidebar {
width: 340px;
height: 600px;
background-color: #fefefe;
overflow: auto;
// ParentComponent.jsx
import React from 'react';
import connect from '../HOCs/connect';
function FeatureComponent({ someProperty }) {
return (
<>
<p>This component is connected to gcursor.</p>
const getWidgetToolbar = function () {
return (
<ul className="buttons center">
<li className="button" data-topic="insert-widget" data-widget-type="text" data-menu="false">
<i className="icon-text-widget" />
<div className="button-title">Text</div>
</li>
<li className="button" data-topic="insert-widget" data-widget-type="image" data-menu="false">
<i className="icon-image-widget" />

The main idea of encapsulated styles that if somebody using the same class in another component it will not break the style of your component.

TREE

./
../Button
../../index.js
../../styles.module.css
import React from 'react';
import PropTypes from 'prop-types';
import { classNames } from 'core/utils';
import {
btn,
btn_fluid,
btn_short,
btn_small,
btn_success,
@vadamk
vadamk / Reports.md
Last active November 6, 2018 09:24

WSO and SO

  • Analize ~ 1d

  • Change select TreeView component ~ 4d

    • поки незрозумілий дизайн
  • Make WSManager module feauter module ~ 6h

    • треба проаналізувати, як зміниться логіка цього компонента
<div
class="toggle-button"
[ngClass]="{'toggle-button_on': innerValue}"
(click)="toggle()">
<div class="toggle-button__circle"></div>
</div>
.toggle-button {
width: 47px;
height: 18px;
<form
[formGroup]="loginForm"
(ngSubmit)="onSubmit()">
<div class="form-group">
<label for="userName">Email address</label>
<input
email
type="email"
id="userName"
import { Injectable } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable()
export class JwtInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
// add authorization header with jwt token if available
const userSession = JSON.parse(localStorage.getItem('userSession'));