Skip to content

Commit

Permalink
Add support for web
Browse files Browse the repository at this point in the history
  • Loading branch information
s-fabian committed Jul 30, 2024
1 parent 0959478 commit cb35d6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/converter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ interface StripPrefixResult {
where?: StylePrefix;
breakpoint?: ResponsiveUnits;
lowerOrLesser?: 'min' | 'max';
platform?: 'android' | 'ios';
platform?: 'android' | 'ios' | 'web';
className?: string;
}

Expand All @@ -38,6 +38,7 @@ function getPrefix(from: string): StripPrefixResult | undefined {
if (!prefix) return;

switch (prefix) {
case 'web':
case 'ios':
case 'android': {
if (result.where || result.breakpoint || result.lowerOrLesser) {
Expand Down
2 changes: 1 addition & 1 deletion src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export type GetFn<T extends Record<string, unknown>> = {
) => Style;
};

export type PlatformPrefix = 'android' | 'ios';
export type PlatformPrefix = 'android' | 'ios' | 'web';

type Platform<V extends string> = `${PlatformPrefix}-${V}` | V;

Expand Down

0 comments on commit cb35d6c

Please sign in to comment.