-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30579 from JKobrynski/migrateIconToTypeScript
[TS Migration] Migrate Icon to TypeScript
- Loading branch information
Showing
18 changed files
with
103 additions
and
69 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import IconWrapperStyle from './types'; | ||
|
||
const style: IconWrapperStyle = { | ||
top: 1, | ||
}; | ||
|
||
export default style; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import IconWrapperStyle from './types'; | ||
|
||
const style: IconWrapperStyle = { | ||
top: 2, | ||
}; | ||
|
||
export default style; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type IconWrapperStyle = { | ||
top: number; | ||
}; | ||
|
||
export default IconWrapperStyle; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Expensicons = jest.requireActual('../Expensicons'); | ||
|
||
module.exports = Object.keys(Expensicons).reduce((prev, curr) => { | ||
// We set the name of the anonymous mock function here so we can dynamically build the list of mocks and access the | ||
// "name" property to use in accessibility hints for element querying | ||
const fn = () => ''; | ||
Object.defineProperty(fn, 'name', {value: curr}); | ||
return {...prev, [curr]: fn}; | ||
}, {}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import {CommonPathProps as BaseCommonPathProps, SvgProps as BaseSvgProps} from 'react-native-svg'; | ||
|
||
declare module 'react-native-svg' { | ||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions | ||
interface SvgProps extends BaseSvgProps { | ||
xmlns?: string; | ||
xmlnsXlink?: string; | ||
xmlSpace?: string; | ||
hovered?: string; | ||
pressed?: string; | ||
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions | ||
interface CommonPathProps extends BaseCommonPathProps { | ||
className?: string; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters