Skip to content

Commit

Permalink
prefix skeleton size prop type with component name
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabricevladimir committed Apr 16, 2024
1 parent 9250b5a commit 64a0d84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/core/components/states/stateSkeletonBar/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { StateSkeletonBar, type IStateSkeletonBarProps, type SkeletonBarSize } from './stateSkeletonBar';
export { StateSkeletonBar, type IStateSkeletonBarProps, type StateSkeletonBarSize } from './stateSkeletonBar';
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import { forwardRef, type ComponentPropsWithoutRef } from 'react';
import { type ResponsiveAttribute, type ResponsiveAttributeClassMap } from '../../../types';
import { responsiveUtils } from '../../../utils';

export type SkeletonBarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
export type StateSkeletonBarSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';

export interface IStateSkeletonBarProps extends ComponentPropsWithoutRef<'span'> {
/**
* Responsive size attribute for the skeleton.
*/
responsiveSize?: ResponsiveAttribute<SkeletonBarSize>;
responsiveSize?: ResponsiveAttribute<StateSkeletonBarSize>;
/**
* The size of the skeleton.
* @default 'md'
*/
size?: SkeletonBarSize;
size?: StateSkeletonBarSize;
}

const responsiveSizeClasses: ResponsiveAttributeClassMap<SkeletonBarSize> = {
const responsiveSizeClasses: ResponsiveAttributeClassMap<StateSkeletonBarSize> = {
sm: { sm: 'h-3', md: 'md:h-3', lg: 'lg:h-3', xl: 'xl:h-3', '2xl': '2xl:h-3' },
md: { sm: 'h-4', md: 'md:h-4', lg: 'lg:h-4', xl: 'xl:h-4', '2xl': '2xl:h-4' },
lg: { sm: 'h-5', md: 'md:h-5', lg: 'lg:h-5', xl: 'xl:h-5', '2xl': '2xl:h-5' },
Expand Down
2 changes: 1 addition & 1 deletion src/core/components/states/stateSkeletonCircular/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export {
StateSkeletonCircular,
type IStateSkeletonCircularProps,
type SkeletonCircularSize,
type StateSkeletonCircularSize,
} from './stateSkeletonCircular';
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ import { forwardRef, type ComponentPropsWithoutRef } from 'react';
import { type ResponsiveAttribute, type ResponsiveAttributeClassMap } from '../../../types';
import { responsiveUtils } from '../../../utils';

export type SkeletonCircularSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';
export type StateSkeletonCircularSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl';

export interface IStateSkeletonCircularProps extends ComponentPropsWithoutRef<'span'> {
/**
* Responsive size attribute for the skeleton.
*/
responsiveSize?: ResponsiveAttribute<SkeletonCircularSize>;
responsiveSize?: ResponsiveAttribute<StateSkeletonCircularSize>;
/**
* The size of the skeleton.
* @default 'md'
*/
size?: SkeletonCircularSize;
size?: StateSkeletonCircularSize;
}

const responsiveSizeClasses: ResponsiveAttributeClassMap<SkeletonCircularSize> = {
const responsiveSizeClasses: ResponsiveAttributeClassMap<StateSkeletonCircularSize> = {
sm: { sm: 'size-6', md: 'md:size-6', lg: 'lg:size-6', xl: 'xl:size-6', '2xl': '2xl:size-6' },
md: { sm: 'size-8', md: 'md:size-8', lg: 'lg:size-8', xl: 'xl:size-8', '2xl': '2xl:size-8' },
lg: { sm: 'size-10', md: 'md:size-10', lg: 'lg:size-10', xl: 'xl:size-10', '2xl': '2xl:size-10' },
Expand Down

0 comments on commit 64a0d84

Please sign in to comment.