Skip to content

Commit

Permalink
feat(core): add outlineStyle, outlineWidth, outlineOffset, outlineCol…
Browse files Browse the repository at this point in the history
…or to the web-only style props to match react-native-web
  • Loading branch information
natew committed Dec 11, 2022
1 parent 7b826db commit 8e92934
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
11 changes: 5 additions & 6 deletions packages/core/src/createTamagui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,11 @@ export function createTamagui<Conf extends CreateTamaguiProps>(
tokensParsed,
parsed: true,
getCSS: (separator = '\n') => {
return `
.is_Text .is_Text {display:inline-flex;}
._dsp_contents {display:contents;}
${themeConfig.cssRuleSets.join(separator)}
${themeConfig.themeRuleSets.join(separator)}
${getAllRules().join(separator)}`
return `.is_Text .is_Text {display:inline-flex;}
._dsp_contents {display:contents;}
${themeConfig.cssRuleSets.join(separator)}
${themeConfig.themeRuleSets.join(separator)}
${getAllRules().join(separator)}`
},
// const tokens = [...getToken(tokens.size[0])]
// .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }
Expand Down
9 changes: 4 additions & 5 deletions packages/core/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -621,16 +621,15 @@ type WithThemeShorthandsPseudosMediaAnimation<A extends object> = WithThemeShort
*/

type StylePropsWebOnly = {
// we make this a style prop as it is on web
pointerEvents?: ViewProps['pointerEvents']
// WEB ONLY
cursor?: Properties['cursor']
// WEB ONLY
contain?: Properties['contain']
// WEB ONLY values: inherit, inline, block, content
display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex'
// WEB ONLY
userSelect?: Properties['userSelect']
outlineColor?: Properties['outlineColor']
outlineStyle?: Properties['outlineStyle']
outlineOffset?: Properties['outlineOffset']
outlineWidth?: Properties['outlineWidth']
}

export type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> &
Expand Down
4 changes: 4 additions & 0 deletions packages/core/types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,10 @@ declare type StylePropsWebOnly = {
contain?: Properties['contain'];
display?: 'inherit' | 'none' | 'inline' | 'block' | 'contents' | 'flex' | 'inline-flex';
userSelect?: Properties['userSelect'];
outlineColor?: Properties['outlineColor'];
outlineStyle?: Properties['outlineStyle'];
outlineOffset?: Properties['outlineOffset'];
outlineWidth?: Properties['outlineWidth'];
};
export declare type StackStylePropsBase = Omit<ViewStyle, 'display' | 'backfaceVisibility' | 'elevation'> & TransformStyleProps & StylePropsWebOnly;
export declare type TextStylePropsBase = Omit<TextStyle, 'display' | 'backfaceVisibility'> & TransformStyleProps & StylePropsWebOnly & {
Expand Down

0 comments on commit 8e92934

Please sign in to comment.