-
Notifications
You must be signed in to change notification settings - Fork 6
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 #334 from etn-ccis/fix/refactor-card
Refactor WorkflowCard
- Loading branch information
Showing
11 changed files
with
119 additions
and
126 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
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
14 changes: 14 additions & 0 deletions
14
login-workflow/src/components/WorkflowCard/WorkflowCardHeader.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,14 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import { useSafeAreaInsets } from 'react-native-safe-area-context'; | ||
import { useScreenDimensions } from '../../hooks/useScreenDimensions'; | ||
|
||
/** | ||
* THIS IS A MOCK IMPLEMENTATION FOR TESTING PURPOSES | ||
*/ | ||
export const WorkflowCardHeader: React.FC = () => { | ||
const insets = useSafeAreaInsets(); | ||
const { isTablet } = useScreenDimensions(); | ||
|
||
return <View style={{ backgroundColor: 'red', height: isTablet ? 56 : 56 + insets.top }} />; | ||
}; |
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,20 @@ | ||
/** | ||
* @packageDocumentation | ||
* @module Hooks | ||
* @internal | ||
*/ | ||
import { useWindowDimensions } from 'react-native'; | ||
|
||
type ScreenWidthProps = { | ||
width: number; | ||
height: number; | ||
isTablet: boolean; | ||
}; | ||
export const useScreenDimensions = (): ScreenWidthProps => { | ||
const { height, width } = useWindowDimensions(); | ||
return { | ||
isTablet: width >= 768, | ||
width: width, | ||
height: height, | ||
}; | ||
}; |
This file was deleted.
Oops, something went wrong.