vuestic-ui
Version:
Vue 3 UI Framework
41 lines (40 loc) • 1.45 kB
TypeScript
import { PropType } from 'vue';
import { SizeConfig } from '../services/global-config/global-config';
export declare const sizesConfig: SizeConfig;
export declare const fontSizesConfig: SizeConfig;
interface SizeProps {
size: string | number;
sizesConfig: Record<string, any>;
fontSizesConfig: Record<string, any>;
}
/**
* You could add these props to any component by destructuring them inside props option.
* @example
* props: { ...useSizeProps, componentsOwnProp, etc. }
* It's better to add props at the beginning, to make sure that Component own props will be used instead in case of collision
*/
export declare const useSizeProps: {
size: {
type: (StringConstructor | NumberConstructor)[];
default: string;
validator: (size: string | number) => boolean;
};
sizesConfig: {
type: PropType<Record<string, any>>;
default: () => SizeConfig;
};
fontSizesConfig: {
type: PropType<Record<string, any>>;
default: () => SizeConfig;
};
};
export declare const useSizeRef: (props: {
size: string | number;
sizesConfig: Record<string, any>;
}) => import("vue").ComputedRef<string>;
export declare const useSize: (props: SizeProps, componentName?: string | undefined) => {
sizeComputed: import("vue").ComputedRef<string>;
fontSizeComputed: import("vue").ComputedRef<string>;
fontSizeInRem: import("vue").ComputedRef<number>;
};
export {};