fix: Animated default set (#37642)

* fix: Animated default set

* test: Update test case
This commit is contained in:
二货爱吃白萝卜 2022-09-19 23:37:12 +08:00 committed by GitHub
parent c15bdcf1dd
commit f7782a05a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -14,10 +14,12 @@ describe('Tabs.Animated', () => {
it('boolean: true', () => {
const { result } = renderHook(() => useAnimateConfig('test', true));
expect(result.current).toEqual({
inkBar: true,
tabPane: false,
});
expect(result.current).toEqual(
expect.objectContaining({
inkBar: true,
tabPane: true,
}),
);
});
it('config', () => {

View File

@ -26,7 +26,7 @@ export default function useAnimateConfig(
} else if (animated === true) {
mergedAnimated = {
inkBar: true,
tabPane: false,
tabPane: true,
};
} else {
mergedAnimated = {