Skip to content

Instantly share code, notes, and snippets.

export enum constants {
SET = 'feature/SET',
}
export type actions = {
set: {
type: constants.SET;
};
}
// Компонент для отображения некой ширины и высоты
const DisplaySize = ({ title, width, height }) => (
<div>
<h4>{title}</h4>
<p>Width: {width}px</p>
<p>Height: {height}px</p>
</div>
);
// Компонент для отслеживания ширины и высоты окна
/**
* Store part
*/
export interface IWithOrders extends IWithApplication, IWithConfig, IWithWidgetDictionaries {
orders: IOrdersState;
}
/**
* State
*/
function getMinutes(time: number): string {
const minutes = Math.floor(time / (60 * 1000)).toString();
return minutes.length > 1 ? minutes : '0' + minutes;
}
function getSeconds(time: number): string {
const seconds = Math.round((time % (60 * 1000)) / 1000).toString();
return seconds.length > 1 ? seconds : '0' + seconds;
}
const types = {
obj: 'Object',
arr: 'Array',
str: 'String',
num: 'Number',
func: 'Function',
bool: 'Boolean',
nil: 'Null',
undef: 'Undefined',
date: 'Date',
import { ITerms } from './index';
export interface ITerms {
totalPrice: number;
initialPayment: number;
periodMonth: number;
monthlyPayment: number;
initialPaymentRangePercent: {
min: number;
max: number;