This commit is contained in:
IDONTSUDO 2024-04-25 12:22:21 +03:00
parent e005a42254
commit e155b4a2a1
26 changed files with 468 additions and 36 deletions

View file

@ -54,7 +54,7 @@ export const ArrayExtensions = () => {
if ([].repeat === undefined) {
// eslint-disable-next-line no-extend-native
Array.prototype.repeat = function (quantity) {
return Array(quantity).fill(this[0]);
return Array(quantity).fill(this).flat(1);
};
}
};

View file

@ -0,0 +1,3 @@
export interface IStyle{
style?: React.CSSProperties;
}

View file

@ -1,12 +1,12 @@
import * as React from "react";
import { CoreText, CoreTextType } from "../text/text";
import { IStyle } from "../../model/style";
export interface IButtonProps {
export interface IButtonProps extends IStyle {
block?: boolean;
filled?: boolean;
text?: string;
onClick?: any;
style?: React.CSSProperties;
}
export function CoreButton(props: IButtonProps) {

View file

@ -1,9 +1,9 @@
import * as React from "react";
import { Result } from "../../helper/result";
import { IStyle } from "../../model/style";
export interface IIconsProps {
export interface IIconsProps extends IStyle {
type: string;
style?: React.CSSProperties;
onClick?: Function;
}

View file

@ -1,11 +1,11 @@
import * as React from "react";
import { CoreText, CoreTextType } from "../text/text";
import { IStyle } from "../../model/style";
interface IInputProps {
interface IInputProps extends IStyle {
label: string;
value?: string;
onChange?: (value: string) => void;
style?: React.CSSProperties;
validation?: (value: string) => boolean;
error?: string;
}

View file

@ -1,13 +1,13 @@
import * as React from "react";
import { Typography } from "antd";
import { useNavigate } from "react-router-dom";
import { IStyle } from "../../model/style";
const { Link } = Typography;
export interface ILinkTypography {
export interface ILinkTypography extends IStyle {
path: string;
text: string;
style?: React.CSSProperties;
}
export const LinkTypography: React.FunctionComponent<ILinkTypography> = (

View file

@ -1,12 +1,12 @@
import React from "react";
import { CoreText, CoreTextType } from "../text/text";
import { IStyle } from "../../model/style";
interface ISelectCoreProps {
interface ISelectCoreProps extends IStyle {
items: string[];
value: string;
label: string;
onChange: (value: string) => void;
style?: React.CSSProperties;
}
export const SelectCore = (props: ISelectCoreProps) => {
const ref = React.useRef<HTMLDivElement>(null);