-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into e.muhamethanov/7699/-custom-scroll-view-na…
…tive-approach
- Loading branch information
Showing
203 changed files
with
2,563 additions
and
1,038 deletions.
There are no files selected for viewing
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
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
15 changes: 15 additions & 0 deletions
15
packages/codemods/src/transforms/v7/__testfixtures__/appearance-provider/alias.input.tsx
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,15 @@ | ||
import { AppearanceProvider as AppearanceProviderAlias, type AppearanceProviderProps as AppearanceProviderPropsAlias, Snackbar } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
const App = () => { | ||
const props: AppearanceProviderPropsAlias = { | ||
value: 'dark', | ||
children: (<Snackbar action="Поделиться">Поделиться</Snackbar>) | ||
}; | ||
|
||
return ( | ||
<React.Fragment> | ||
<AppearanceProviderAlias {...props} /> | ||
</React.Fragment> | ||
); | ||
}; |
26 changes: 26 additions & 0 deletions
26
packages/codemods/src/transforms/v7/__testfixtures__/appearance-provider/basic.input.tsx
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,26 @@ | ||
import { AppearanceProvider, type AppearanceProviderProps, Snackbar } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
type Props = AppearanceProviderProps & { | ||
additionalProp: string, | ||
} | ||
|
||
const App = () => { | ||
const props: AppearanceProviderProps = { | ||
value: 'dark', | ||
children: (<Snackbar action="Поделиться">Поделиться</Snackbar>) | ||
}; | ||
|
||
const getAdditionalProvider = () => ( | ||
<AppearanceProvider value={"light"}> | ||
<Snackbar action="Поделиться">Поделиться</Snackbar> | ||
</AppearanceProvider> | ||
) | ||
|
||
return ( | ||
<React.Fragment> | ||
<AppearanceProvider {...props} /> | ||
{getAdditionalProvider()} | ||
</React.Fragment> | ||
); | ||
}; |
20 changes: 20 additions & 0 deletions
20
packages/codemods/src/transforms/v7/__testfixtures__/appearance/alias.input.tsx
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,20 @@ | ||
import { Appearance as AppearanceAlias, type AppearanceType as AppearanceTypeAlias } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
const Component: React.FC<{ | ||
appearance: AppearanceTypeAlias; | ||
}> = () => { | ||
return ( | ||
<div></div> | ||
) | ||
} | ||
|
||
const App = () => { | ||
const appearance: AppearanceTypeAlias = AppearanceAlias.LIGHT; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Component appearance={AppearanceAlias.DARK} /> | ||
</React.Fragment> | ||
); | ||
}; |
24 changes: 24 additions & 0 deletions
24
packages/codemods/src/transforms/v7/__testfixtures__/appearance/basic.input.tsx
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,24 @@ | ||
import { Appearance, type AppearanceType, useAppearance } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
const Component: React.FC<{ | ||
appearance: AppearanceType; | ||
}> = ({ | ||
appearance, | ||
}) => { | ||
return ( | ||
<div></div> | ||
) | ||
} | ||
|
||
const App = () => { | ||
const appearance: AppearanceType = Appearance.LIGHT; | ||
|
||
const fromHookAppearance = useAppearance(); | ||
|
||
return ( | ||
<React.Fragment> | ||
<Component appearance={Appearance.DARK} /> | ||
</React.Fragment> | ||
); | ||
}; |
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
33 changes: 33 additions & 0 deletions
33
packages/codemods/src/transforms/v7/__testfixtures__/config-provider/basic.input.tsx
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,33 @@ | ||
import { ConfigProvider, ConfigProviderContext } from '@vkontakte/vkui'; | ||
import React, {createContext} from 'react'; | ||
|
||
const OtherContext = createContext({}); | ||
|
||
|
||
const App = () => { | ||
const contextValue = {} | ||
return ( | ||
<> | ||
<ConfigProvider | ||
appearance={"dark"} | ||
{...contextValue} | ||
> | ||
<div></div> | ||
</ConfigProvider> | ||
|
||
<ConfigProviderContext.Provider value={{ | ||
appearance: 'light', | ||
...contextValue | ||
}}> | ||
<div></div> | ||
</ConfigProviderContext.Provider> | ||
|
||
<OtherContext.Provider value={{ | ||
appearance: 'light', | ||
...contextValue | ||
}}> | ||
<div></div> | ||
</OtherContext.Provider> | ||
</> | ||
); | ||
}; |
26 changes: 26 additions & 0 deletions
26
packages/codemods/src/transforms/v7/__testfixtures__/horizontal-cell/basic.input.tsx
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,26 @@ | ||
import { HorizontalCell, Image } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
const App = () => { | ||
return ( | ||
<React.Fragment> | ||
<HorizontalCell | ||
header="Title" | ||
subtitle="Subtitle" | ||
extraSubtitle="Extra Subtitle" | ||
size="m" | ||
> | ||
<Image size={88} borderRadius="l" /> | ||
</HorizontalCell> | ||
|
||
<HorizontalCell | ||
header={'Title'} | ||
subtitle="Subtitle" | ||
extraSubtitle="Extra Subtitle" | ||
size="m" | ||
> | ||
<Image size={88} borderRadius="l" /> | ||
</HorizontalCell> | ||
</React.Fragment> | ||
); | ||
}; |
31 changes: 31 additions & 0 deletions
31
packages/codemods/src/transforms/v7/__testfixtures__/rich-cell/basic.input.tsx
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,31 @@ | ||
import { Avatar, RichCell } from '@vkontakte/vkui'; | ||
import React from 'react'; | ||
|
||
const App = () => { | ||
const text = "Text" | ||
return ( | ||
<React.Fragment> | ||
<RichCell | ||
before={<Avatar size={72} src="" />} | ||
subhead="Subhead" | ||
text="Text" | ||
caption="Caption" | ||
after="After" | ||
afterCaption="After Caption" | ||
> | ||
Children | ||
</RichCell> | ||
|
||
<RichCell | ||
before={<Avatar size={72} src="" />} | ||
subhead={"Subhead"} | ||
text={text} | ||
caption={"Caption"} | ||
after="After" | ||
afterCaption="After Caption" | ||
> | ||
Children | ||
</RichCell> | ||
</React.Fragment> | ||
); | ||
}; |
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
Oops, something went wrong.