import { ButtonProps } from "../button" ; import s from "./size.module.css" ; export interface ButtonSize { mainClassName : string ; iconSize : number ; iconMargin : number ; } const largeCommon = { iconSize : 20 , iconMargin : 12 } ; const mediumCommon = { iconSize : 16 , iconMargin : 8 } ; const smallCommon = { iconSize : 12 , iconMargin : 4 } ; const large = { mainClassName : s . large , ... largeCommon } ; const largeIcon = { mainClassName : s . largeIcon , ... largeCommon } ; const medium = { mainClassName : s . medium , ... mediumCommon } ; const mediumIcon = { mainClassName : s . mediumIcon , ... mediumCommon } ; const small = { mainClassName : s . small , ... smallCommon } ; const smallIcon = { mainClassName : s . smallIcon , ... smallCommon } ; export const buttonSizes = { large , largeIcon , medium , mediumIcon , small , smallIcon , } ; export const getButtonSize = ( props ) : ButtonSize => { return props . size ?? buttonSizes . medium ; } ;