Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to migrate from old version to latest version #182

Open
zydjohnHotmail opened this issue May 10, 2023 · 0 comments
Open

How to migrate from old version to latest version #182

zydjohnHotmail opened this issue May 10, 2023 · 0 comments

Comments

@zydjohnHotmail
Copy link

Hi,
I have some code using the old version of csstype, but I am not sure it is from this repo or not. I have the following code in TypeScript:
import {
FontWeightProperty,
ColorProperty,
FontFamilyProperty,
BorderColorProperty,
BorderProperty,
BorderRadiusProperty,
HeightProperty,
WidthProperty,
FontSizeProperty,
LineHeightProperty,
PaddingProperty,
MarginProperty,
} from 'csstype';
/* Colors */
const colorWhite: ColorProperty = '#FFFFFF';
const gradientPurple: ColorProperty = linear-gradient(300.29deg, ${primaryColorLight} -9.7%, ${primaryColor} 85.28%);

/* Padding /
const spacingMultiplier = 4;
const spacingHalfUnit: PaddingProperty | MarginProperty = px(spacingMultiplier * 0.5);
/
Fonts /
const fontMontserrat: FontFamilyProperty = 'Montserrat, sans-serif';
const fontSizeXs: FontSizeProperty = px(10);
/
Border /
const borderColor: BorderColorProperty = '#CCCCCC';
const borderSize: BorderProperty = px(1);
/
Button */
const buttonRadiusSm: BorderRadiusProperty = px(16);
const buttonRadiusLg: BorderRadiusProperty = px(24);

const buttonHeightSm: HeightProperty = px(32);
const buttonHeightLg: HeightProperty = px(48);
And some other code to make rather complicated UI interface, the code looks nice. But I can't find any exported module in the latest version (3.1.2) having any of the imported module names.
Please advise, if the above code was for npm 'csstype' old version, if yes, how can I migrate them to new version.
If no, let me know if the latest version (3.1.2) "csstype" can write the similar code or not.
Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant