Skip to content

Commit

Permalink
Fix rnw types
Browse files Browse the repository at this point in the history
  • Loading branch information
TheUltDev committed Jul 24, 2024
1 parent 9f77a11 commit 82186aa
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
3 changes: 0 additions & 3 deletions client/src/app/base/MenuSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export function MenuSection(props: MenuSectionProps) {
<>
<Pressable
onPress={() => setOpen(!open)}
// @ts-ignore
style={({hovered}) => [
styles.trigger,
hovered && {
Expand All @@ -56,15 +55,13 @@ export function MenuSection(props: MenuSectionProps) {
accessibilityLabel={props.action.label}
style={(e) => [
styles.action,
// @ts-ignore
(e.hovered || root.hovered) && styles.actionVisible,
]}>
{action =>
<Icon
size={16}
name={props.action?.icon || ''}
color={
// @ts-ignore
action.hovered
? theme.colors.foreground
: theme.colors.mutedForeground
Expand Down
31 changes: 31 additions & 0 deletions client/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
/// <reference types="vite/client"/>
/// <reference types="design/types"/>

import 'react-native';

declare module 'react-native' {
interface PressableStateCallbackType {
hovered?: boolean,
focused?: boolean,
}
interface ViewStyle {
transitionProperty?: string,
transitionDuration?: string,
}
interface TextProps {
accessibilityComponentType?: never,
accessibilityTraits?: never,
href?: string,
hrefAttrs?: {
rel: 'noreferrer',
target?: '_blank',
},
}
interface ViewProps {
onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void,
accessibilityRole?: string,
href?: string,
hrefAttrs?: {
rel: 'noreferrer',
target?: '_blank',
},
}
}

0 comments on commit 82186aa

Please sign in to comment.