src/components
├── ComponentName
│ ├── _modName
│ │ ├── ComponentName_modName.tsx
│ │ ├── ComponentName_modName_modVal.tsx
│ │ └── ComponentName_modName_modVal.css
│ ├── ElementName
│ │ ├── ComponentName-ElementName.tsx
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 cn from 'classnames'; | |
import React, { CSSProperties, useCallback, useState } from 'react'; | |
import { createEditor, BaseEditor, Descendant, Editor, Element, CustomTypes } from 'slate'; | |
import { Slate, Editable, withReact, ReactEditor, RenderElementProps, RenderLeafProps } from 'slate-react'; | |
import s from './slate.module.scss'; | |
type CustomElement = { type: 'paragraph'; children: CustomText[] }; | |
type CodeElement = { type: 'code'; children?: CustomText[] }; | |
type Marks = { bold?: boolean; code?: boolean; italic?: boolean }; |
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 { useCallback, useEffect, useState } from 'react'; | |
interface UseOfflineDetectorProps { | |
setStatus?: ([global, remote]: [boolean, boolean]) => void; | |
pollingDelay?: number; | |
remoteServerUrl?: string; | |
}; | |
export const useOfflineDetector = ({ | |
setStatus, |
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
<AutoCompleteSingle items={[{ value: 'one' }]} onChange={(value: string) => {}} /> | |
<AutoCompleteMulti items={[]} onChange={(value: string[]) => {}} /> | |
<AutoCompleteMulti items={[]} onChange={(value: string[]) => {}}> | |
<AutoCompleteInput onChange={(e) => {}} /> | |
<AutoCompleteTitle>Suggestions:</AutoCompleteTitle> | |
</AutoCompleteMulti> |
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 styled, { css } from 'styled-components'; | |
import CodeMirror, { ReactCodeMirrorProps } from '@uiw/react-codemirror'; | |
import { markdown, markdownLanguage } from '@codemirror/lang-markdown'; | |
import { languages } from '@codemirror/language-data'; | |
import { oneDark } from '@codemirror/theme-one-dark'; | |
import { inputBorderColor } from '../../@generated/themes'; | |
interface CodeEditorProps { |
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
(() => { | |
const id = window.location; | |
const connection = indexedDB.open("canvas"); // one version all the time | |
connection.onupgradeneeded = () => { | |
console.log("Creating storage in the IndexDB instance"); | |
const db = connection.result; |
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
{"lastUpload":"2021-12-20T11:54:45.398Z","extensionVersion":"v3.4.3"} |
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 { Elem } from 'bem-react-core'; | |
import { Button } from '../Button'; | |
export class AppHeader extends Elem { | |
block = 'App'; | |
elem = 'Header'; | |
tag() { | |
return 'h2'; | |
} |
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 { decl } from 'bem-react-core'; | |
export default decl({ | |
block: 'App', | |
elem: 'Header', | |
attrs: { | |
role: 'heading' | |
}, | |
content() { | |
return 'я заголовок'; |
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 * as React from 'react'; | |
import { cn } from '@bem-react/classname'; | |
import './Ticket-Point.css'; | |
const cnTicket = cn('Ticket'); | |
export interface ITicketPointProps { | |
className?: string; | |
mode: 'origin' | 'destination'; |
NewerOlder