@snack-uikit/button
Advanced tools
Comparing version 0.16.1 to 0.17.0
@@ -6,2 +6,13 @@ # Change Log | ||
# 0.17.0 (2024-02-28) | ||
### Features | ||
* **FF-4147:** all buttons has xs/s/m/l size ([4abf5aa](https://github.com/cloud-ru-tech/snack-uikit/commit/4abf5aa1fab0538f84f2eedd60a7f9b54848442e)) | ||
## 0.16.1 (2024-02-20) | ||
@@ -8,0 +19,0 @@ |
@@ -11,5 +11,5 @@ /// <reference types="react" /> | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "appearance" | "size" | "iconPosition" | "label" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "appearance" | "size" | "label" | "iconPosition" | "fullWidth" | "labelClassName"> & Required<Pick<CommonButtonProps, "icon">> & { | ||
/** Размер */ | ||
size?: Size | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, SizeSL } from '../../types'; | ||
export type ButtonFilledProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'size'> & { | ||
size?: SizeSL; | ||
}>; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonFilledProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonFilled: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size" | "iconPosition"> & { | ||
size?: SizeSL | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE_S_L, TARGET } from '../../constants'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
@@ -22,4 +22,4 @@ import { extractCommonButtonProps } from '../../utils'; | ||
export const ButtonFilled = forwardRef((_a, ref) => { | ||
var { className, size = SIZE_S_L.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, tabIndex, fullWidth = false } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "tabIndex", "fullWidth"]); | ||
var { className, size = SIZE.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, tabIndex, fullWidth = false } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "tabIndex", "fullWidth"]); | ||
return (_jsx(ButtonPrivate, Object.assign({}, extractSupportProps(rest), extractCommonButtonProps(rest), { className: cn(styles.button, className), iconClassName: styles.icon, labelClassName: styles.label, size: size, fullWidth: fullWidth, target: target, type: type, appearance: appearance, tabIndex: tabIndex, ref: ref }))); | ||
}); |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, CounterButtonProps, SizeXsM } from '../../types'; | ||
export type ButtonFunctionProps = WithSupportProps<Omit<CommonButtonProps, 'size'> & { | ||
size?: SizeXsM; | ||
}> & CounterButtonProps; | ||
import { CommonButtonProps, CounterButtonProps } from '../../types'; | ||
export type ButtonFunctionProps = WithSupportProps<CommonButtonProps> & CounterButtonProps; | ||
export declare const ButtonFunction: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size"> & { | ||
size?: SizeXsM | undefined; | ||
} & CounterButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; | ||
} & import("react").AriaAttributes & import("../../types").AnchorButtonProps & import("../../types").BaseButtonProps & CounterButtonProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, ICON_POSITION, SIZE_XS_M, TARGET } from '../../constants'; | ||
import { APPEARANCE, HTML_TYPE, ICON_POSITION, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
@@ -22,4 +22,4 @@ import { extractCommonButtonProps, extractCounterButtonProps } from '../../utils'; | ||
export const ButtonFunction = forwardRef((_a, ref) => { | ||
var { className, iconPosition = ICON_POSITION.After, size = SIZE_XS_M.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Neutral, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "iconPosition", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
var { className, iconPosition = ICON_POSITION.After, size = SIZE.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Neutral, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "iconPosition", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (_jsx(ButtonPrivate, Object.assign({}, extractSupportProps(rest), extractCounterButtonProps(rest), extractCommonButtonProps(rest), { className: cn(styles.button, className), iconClassName: styles.icon, iconPosition: iconPosition, labelClassName: styles.label, size: size, fullWidth: fullWidth, target: target, type: type, appearance: appearance, tabIndex: tabIndex, ref: ref }))); | ||
}); |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, SizeSL } from '../../types'; | ||
export type ButtonOutlineProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'size'> & { | ||
size?: SizeSL; | ||
}>; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonOutlineProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonOutline: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size" | "iconPosition"> & { | ||
size?: SizeSL | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE_S_L, TARGET } from '../../constants'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
@@ -22,4 +22,4 @@ import { extractCommonButtonProps } from '../../utils'; | ||
export const ButtonOutline = forwardRef((_a, ref) => { | ||
var { className, size = SIZE_S_L.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
var { className, size = SIZE.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (_jsx(ButtonPrivate, Object.assign({}, extractSupportProps(rest), extractCommonButtonProps(rest), { className: cn(styles.button, className), iconClassName: styles.icon, labelClassName: styles.label, size: size, fullWidth: fullWidth, target: target, type: type, appearance: appearance, tabIndex: tabIndex, ref: ref }))); | ||
}); |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, SizeSL } from '../../types'; | ||
export type ButtonSimpleProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'size'> & { | ||
size?: SizeSL; | ||
}>; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonSimpleProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonSimple: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size" | "iconPosition"> & { | ||
size?: SizeSL | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE_S_L, TARGET } from '../../constants'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
@@ -22,4 +22,4 @@ import { extractCommonButtonProps } from '../../utils'; | ||
export const ButtonSimple = forwardRef((_a, ref) => { | ||
var { className, size = SIZE_S_L.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Neutral, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
var { className, size = SIZE.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Neutral, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (_jsx(ButtonPrivate, Object.assign({}, extractSupportProps(rest), extractCommonButtonProps(rest), { className: cn(styles.button, className), iconClassName: styles.icon, labelClassName: styles.label, size: size, fullWidth: fullWidth, target: target, type: type, appearance: appearance, tabIndex: tabIndex, ref: ref }))); | ||
}); |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, SizeSL } from '../../types'; | ||
export type ButtonTonalProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition' | 'size'> & { | ||
size?: SizeSL; | ||
}>; | ||
import { CommonButtonProps } from '../../types'; | ||
export type ButtonTonalProps = WithSupportProps<Omit<CommonButtonProps, 'iconPosition'>>; | ||
export declare const ButtonTonal: import("react").ForwardRefExoticComponent<{ | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size" | "iconPosition"> & { | ||
size?: SizeSL | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "iconPosition"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
@@ -16,3 +16,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { extractSupportProps } from '@snack-uikit/utils'; | ||
import { APPEARANCE, HTML_TYPE, SIZE_S_L, TARGET } from '../../constants'; | ||
import { APPEARANCE, HTML_TYPE, SIZE, TARGET } from '../../constants'; | ||
import { ButtonPrivate } from '../../helperComponents'; | ||
@@ -22,4 +22,4 @@ import { extractCommonButtonProps } from '../../utils'; | ||
export const ButtonTonal = forwardRef((_a, ref) => { | ||
var { className, size = SIZE_S_L.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
var { className, size = SIZE.S, target = TARGET.Blank, type = HTML_TYPE.Button, appearance = APPEARANCE.Primary, fullWidth = false, tabIndex } = _a, rest = __rest(_a, ["className", "size", "target", "type", "appearance", "fullWidth", "tabIndex"]); | ||
return (_jsx(ButtonPrivate, Object.assign({}, extractSupportProps(rest), extractCommonButtonProps(rest), { className: cn(styles.button, className), iconClassName: styles.icon, labelClassName: styles.label, size: size, fullWidth: fullWidth, target: target, type: type, appearance: appearance, tabIndex: tabIndex, ref: ref }))); | ||
}); |
@@ -17,10 +17,6 @@ export declare const APPEARANCE: { | ||
}; | ||
export declare const SIZE_XS_M: { | ||
export declare const SIZE: { | ||
readonly Xs: "xs"; | ||
readonly S: "s"; | ||
readonly M: "m"; | ||
}; | ||
export declare const SIZE_S_L: { | ||
readonly S: "s"; | ||
readonly M: "m"; | ||
readonly L: "l"; | ||
@@ -27,0 +23,0 @@ }; |
@@ -17,10 +17,6 @@ export const APPEARANCE = { | ||
}; | ||
export const SIZE_XS_M = { | ||
export const SIZE = { | ||
Xs: 'xs', | ||
S: 's', | ||
M: 'm', | ||
}; | ||
export const SIZE_S_L = { | ||
S: 's', | ||
M: 'm', | ||
L: 'l', | ||
@@ -27,0 +23,0 @@ }; |
/// <reference types="react" /> | ||
import { WithSupportProps } from '@snack-uikit/utils'; | ||
import { CommonButtonProps, CounterButtonProps } from '../../types'; | ||
export type ButtonPrivateProps = WithSupportProps<Omit<CommonButtonProps, 'size'> & CounterButtonProps & { | ||
export type ButtonPrivateProps = WithSupportProps<CommonButtonProps & CounterButtonProps & { | ||
iconClassName: string; | ||
labelClassName: string; | ||
size?: string; | ||
fullWidth?: boolean; | ||
@@ -12,7 +11,6 @@ }>; | ||
'data-test-id'?: string | undefined; | ||
} & import("react").AriaAttributes & Omit<CommonButtonProps, "size"> & CounterButtonProps & { | ||
} & import("react").AriaAttributes & import("../../types").AnchorButtonProps & import("../../types").BaseButtonProps & CounterButtonProps & { | ||
iconClassName: string; | ||
labelClassName: string; | ||
size?: string | undefined; | ||
fullWidth?: boolean | undefined; | ||
} & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>; |
import { AnchorHTMLAttributes, ButtonHTMLAttributes, FocusEventHandler, KeyboardEventHandler, MouseEventHandler, ReactElement } from 'react'; | ||
import { CounterProps } from '@snack-uikit/counter'; | ||
import { ValueOf } from '@snack-uikit/utils'; | ||
import { APPEARANCE, ICON_POSITION, SIZE_S_L, SIZE_XS_M } from './constants'; | ||
import { APPEARANCE, ICON_POSITION, SIZE } from './constants'; | ||
export type Appearance = ValueOf<typeof APPEARANCE>; | ||
export type IconPosition = ValueOf<typeof ICON_POSITION>; | ||
export type SizeSL = ValueOf<typeof SIZE_S_L>; | ||
export type SizeXsM = ValueOf<typeof SIZE_XS_M>; | ||
export type Size = ValueOf<typeof SIZE>; | ||
export type BaseButtonProps = { | ||
@@ -34,3 +33,3 @@ /** CSS-класс */ | ||
/** Размер */ | ||
size?: SizeXsM | SizeSL; | ||
size?: Size; | ||
/** Внешний вид кнопки */ | ||
@@ -37,0 +36,0 @@ appearance?: Appearance; |
@@ -7,3 +7,3 @@ { | ||
"title": "Button", | ||
"version": "0.16.1", | ||
"version": "0.17.0", | ||
"sideEffects": [ | ||
@@ -41,3 +41,3 @@ "*.css", | ||
}, | ||
"gitHead": "fd079dd3acbfe935d0b88d9efd863047f25e5824" | ||
"gitHead": "0054db0a5550fb69d388335d844017bca31fffe7" | ||
} |
@@ -67,2 +67,3 @@ # Button | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
@@ -72,3 +73,2 @@ | type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| size | enum SizeSL: `"s"`, `"m"`, `"l"` | s | | | ||
| ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
@@ -91,2 +91,3 @@ | key | `Key` | - | | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | neutral | Внешний вид кнопки | | ||
@@ -96,3 +97,2 @@ | type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| size | enum SizeSL: `"s"`, `"m"`, `"l"` | s | | | ||
| ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
@@ -115,2 +115,3 @@ | key | `Key` | - | | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
@@ -120,3 +121,2 @@ | type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| size | enum SizeSL: `"s"`, `"m"`, `"l"` | s | | | ||
| ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
@@ -139,2 +139,3 @@ | key | `Key` | - | | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | primary | Внешний вид кнопки | | ||
@@ -144,3 +145,2 @@ | type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| size | enum SizeSL: `"s"`, `"m"`, `"l"` | s | | | ||
| ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
@@ -152,3 +152,2 @@ | key | `Key` | - | | | ||
|------|------|---------------|-------------| | ||
| iconPosition | enum IconPosition: `"before"`, `"after"` | after | Позиция иконки | | ||
| href | `string` | - | Ссылка | | ||
@@ -159,2 +158,3 @@ | target | `HTMLAttributeAnchorTarget` | _blank | HTML-аттрибут target | | ||
| icon | `ReactElement` | - | Иконка | | ||
| iconPosition | enum IconPosition: `"before"`, `"after"` | after | Позиция иконки | | ||
| label | `string` | - | Текст кнопки | | ||
@@ -166,2 +166,3 @@ | loading | `boolean` | - | Флаг состояния загрузки | | ||
| onBlur | `FocusEventHandler<HTMLButtonElement \| HTMLAnchorElement>` | - | Колбек обработки блюра | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| appearance | enum Appearance: `"primary"`, `"neutral"`, `"destructive"` | neutral | Внешний вид кнопки | | ||
@@ -171,3 +172,2 @@ | type | "submit" \| "reset" \| "button" | button | HTML-аттрибут type | | ||
| fullWidth | `boolean` | - | Сделать кнопку во всю ширину | | ||
| size | enum SizeXsM: `"s"`, `"m"`, `"xs"` | s | | | ||
| counter | `CounterInButtonProps` | - | Пропсы каунтера в кнопке | | ||
@@ -192,3 +192,3 @@ | ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
| tabIndex | `number` | - | HTML-аттрибут tab-index | | ||
| size | enum Size: `"s"`, `"m"`, `"l"`, `"xs"` | s | Размер | | ||
| size | enum Size: `"xs"`, `"s"`, `"m"`, `"l"` | s | Размер | | ||
| ref | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | - | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom | | ||
@@ -195,0 +195,0 @@ | key | `Key` | - | | |
@@ -20,11 +20,6 @@ export const APPEARANCE = { | ||
export const SIZE_XS_M = { | ||
export const SIZE = { | ||
Xs: 'xs', | ||
S: 's', | ||
M: 'm', | ||
} as const; | ||
export const SIZE_S_L = { | ||
S: 's', | ||
M: 'm', | ||
L: 'l', | ||
@@ -31,0 +26,0 @@ } as const; |
@@ -13,3 +13,3 @@ import { | ||
import { APPEARANCE, ICON_POSITION, SIZE_S_L, SIZE_XS_M } from './constants'; | ||
import { APPEARANCE, ICON_POSITION, SIZE } from './constants'; | ||
@@ -20,6 +20,4 @@ export type Appearance = ValueOf<typeof APPEARANCE>; | ||
export type SizeSL = ValueOf<typeof SIZE_S_L>; | ||
export type Size = ValueOf<typeof SIZE>; | ||
export type SizeXsM = ValueOf<typeof SIZE_XS_M>; | ||
export type BaseButtonProps = { | ||
@@ -50,3 +48,3 @@ /** CSS-класс */ | ||
/** Размер */ | ||
size?: SizeXsM | SizeSL; | ||
size?: Size; | ||
/** Внешний вид кнопки */ | ||
@@ -53,0 +51,0 @@ appearance?: Appearance; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174856
2914