Skip to content

Commit

Permalink
type: remove all ts warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
shervinchen committed Nov 10, 2024
1 parent b31405d commit eaeee17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/Grid/Grid.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export const justifyStyleMap: {
'space-evenly': 'space-evenly',
};

const isLegalGutterNumber = (value: ResponsiveValue<number>) => {
const isLegalGutterNumber = (value?: ResponsiveValue<number>) => {
return Number.isInteger(value) && (value as number) >= 0;
};

const isLegalColPropertyValue = (value: ResponsiveValue<number>) => {
const isLegalColPropertyValue = (value?: ResponsiveValue<number>) => {
return (
Number.isInteger(value) &&
(value as number) >= 1 &&
Expand All @@ -52,7 +52,7 @@ const isLegalColPropertyValue = (value: ResponsiveValue<number>) => {

const isLegalGridPropertyValue = (
type: 'gutter' | 'align' | 'justify',
value:
value?:
| ResponsiveValue<number>
| ResponsiveValue<Align>
| ResponsiveValue<Justify>
Expand Down Expand Up @@ -143,7 +143,7 @@ export const getColResponsiveStyle = (
) {
responsiveStyle[breakPoint] = calculateColStyle(
type,
responsiveValue[breakPoint]
responsiveValue[breakPoint] as number
);
}
});
Expand Down

0 comments on commit eaeee17

Please sign in to comment.