Skip to content

Commit

Permalink
Add size to mods interfaces for the rest part of components
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyManetov committed Feb 7, 2025
1 parent 9c61c8c commit 24af728
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion app/src/docs/IconButton.doc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class IconButtonDoc extends BaseDocsBlock {
doc.setDefaultPropExample('onClick', () => true);
doc.setDefaultPropExample('icon', ({ value }) => value === ActionIcon);
},
preview: (docPreview: DocPreviewBuilder<promo.IconButtonProps | loveship.IconButtonProps| uui.IconButtonProps>) => {
preview: (docPreview: DocPreviewBuilder<promo.IconButtonProps | loveship.IconButtonProps | uui.IconButtonProps>) => {
const TEST_DATA = {
icon: 'action-account-fill.svg',
dropdownIcon: 'navigation-chevron_down-outline.svg',
Expand Down
2 changes: 1 addition & 1 deletion epam-promo/components/buttons/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createSkinComponent } from '@epam/uui-core';
import { EpamPrimaryColor } from '../types';
import * as uui from '@epam/uui';

interface IconButtonMods {
interface IconButtonMods extends Pick<uui.LinkButtonProps, 'size'> {
/**
* Defines component color.
* @default 'gray60'
Expand Down
2 changes: 1 addition & 1 deletion epam-promo/components/buttons/LinkButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSkinComponent } from '@epam/uui-core';
import * as uui from '@epam/uui';

type LinkButtonMods = {
type LinkButtonMods = Pick<uui.LinkButtonProps, 'size'> & {
/**
* Defines component color.
* @default 'blue'
Expand Down
2 changes: 1 addition & 1 deletion loveship/components/buttons/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EpamAdditionalColor, EpamPrimaryColor } from '../types';

type IconButtonColor = EpamPrimaryColor | EpamAdditionalColor | 'white' | 'night500' | 'night600' | uui.IconButtonProps['color'];

type IconButtonMods = {
type IconButtonMods = Pick<uui.IconButtonProps, 'size'> & {
/**
* Defines component color.
* @default 'night600'
Expand Down
2 changes: 1 addition & 1 deletion loveship/components/buttons/LinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as uui from '@epam/uui';

type LinkButtonColor = 'sky' | 'grass' | 'fire' | 'night100' | 'night600' | uui.LinkButtonProps['color'];

type LinkButtonMods = {
type LinkButtonMods = Pick<uui.LinkButtonProps, 'size'> & {
/**
* Defines component color.
* @default 'sky'
Expand Down
8 changes: 4 additions & 4 deletions uui/components/buttons/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ interface IconButtonMods {
* @default 'neutral'
*/
color?: 'info' | 'success' | 'error' | 'primary' | 'accent' | 'critical' | 'warning' | 'secondary' | 'neutral' | 'white';
}

/** Represents the Core properties of the IconButton component. */
export type IconButtonCoreProps = Omit<uuiComponents.IconButtonProps, 'size'> & {
/**
* Defines component size.
*/
size?: '18' | '24' | '30' | '36';
};
}

/** Represents the Core properties of the IconButton component. */
export type IconButtonCoreProps = Omit<uuiComponents.IconButtonProps, 'size'>;

export interface IconButtonModsOverride {}

Expand Down
11 changes: 6 additions & 5 deletions uui/components/buttons/LinkButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ interface LinkButtonMods {
* @default 'primary'
*/
color?: 'primary' | 'secondary' | 'accent' | 'critical' | 'white' | 'contrast';
}

/** Represents the Core properties of the LinkButton component. */
export interface LinkButtonCoreProps extends ClickableComponentProps, IDropdownToggler, IHasIcon, IHasCaption {
/** Icon for drop-down toggler */
dropdownIcon?: Icon;
/**
* Defines component size.
* @default '36'
*/
size?: types.ControlSize | '42';
}

/** Represents the Core properties of the LinkButton component. */
export interface LinkButtonCoreProps extends ClickableComponentProps, IDropdownToggler, IHasIcon, IHasCaption {
/** Icon for drop-down toggler */
dropdownIcon?: Icon;
/**
* Defines component font-weight
* @default 'semibold'
Expand Down
5 changes: 2 additions & 3 deletions uui/components/widgets/CountIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ type CountIndicatorMods = {
* Defines component color.
*/
color: 'neutral' | 'white' | 'info' | 'success' | 'warning' | 'critical';
};

export type CountIndicatorCoreProps = IHasCaption & IHasCX & {
/**
* Defines component size.
* @default '24'
*/
size?: '12' | '18' | '24';
};

export type CountIndicatorCoreProps = IHasCaption & IHasCX;

export type CountIndicatorProps = CountIndicatorCoreProps & CountIndicatorMods;

export const CountIndicator = forwardRef<HTMLDivElement, CountIndicatorProps>((props, ref) => {
Expand Down

0 comments on commit 24af728

Please sign in to comment.