-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PC-33522) refactor(cheatcode): reorganize cheatcode
- Loading branch information
1 parent
99d132e
commit 2ef3d3e
Showing
119 changed files
with
1,581 additions
and
2,255 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
Validating CODEOWNERS rules …
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
2 changes: 1 addition & 1 deletion
2
...omponents/CheatMenuButton.native.test.tsx → ...omponents/CheatMenuButton.native.test.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
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,52 @@ | ||
import React, { PropsWithChildren } from 'react' | ||
import styled from 'styled-components/native' | ||
|
||
import { | ||
PageHeaderWithoutPlaceholder, | ||
useGetHeaderHeight, | ||
} from 'ui/components/headers/PageHeaderWithoutPlaceholder' | ||
import { Spacer } from 'ui/theme' | ||
|
||
type Props = PropsWithChildren<{ | ||
title: string | ||
flexDirection?: 'row' | 'column' | ||
}> | ||
|
||
export const CheatcodesTemplateScreen: React.FC<Props> = ({ | ||
title, | ||
flexDirection = 'row', | ||
children, | ||
}) => { | ||
const headerHeight = useGetHeaderHeight() | ||
|
||
return ( | ||
<React.Fragment> | ||
<PageHeaderWithoutPlaceholder title={title} /> | ||
<Placeholder height={headerHeight} /> | ||
<ScrollView> | ||
<StyledContainer flexDirection={flexDirection}>{children}</StyledContainer> | ||
<Spacer.BottomScreen /> | ||
</ScrollView> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
const Placeholder = styled.View<{ height: number }>(({ height }) => ({ | ||
height, | ||
backgroundColor: 'white', | ||
})) | ||
|
||
const ScrollView = styled.ScrollView.attrs(({ theme }) => ({ | ||
contentContainerStyle: { | ||
backgroundColor: theme.colors.white, | ||
}, | ||
}))`` | ||
|
||
const StyledContainer = styled.View<{ flexDirection: 'row' | 'column' }>( | ||
({ theme, flexDirection }) => ({ | ||
flexDirection, | ||
flexWrap: flexDirection === 'row' ? 'wrap' : 'nowrap', | ||
paddingVertical: theme.contentPage.marginVertical, | ||
paddingHorizontal: theme.contentPage.marginHorizontal, | ||
}) | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
Oops, something went wrong.