-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(llm): optimize the ui of stacked braze cards
- Loading branch information
1 parent
ce66ea7
commit 2b8a75f
Showing
8 changed files
with
89 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"live-mobile": patch | ||
--- | ||
|
||
Change the UI of stacked horizontal cards. The UI will fit with the design if there is more than one card from braze and if these cards have full width |
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
35 changes: 35 additions & 0 deletions
35
apps/ledger-live-mobile/src/contentCards/layouts/grid/utils.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,35 @@ | ||
import { useTheme } from "styled-components/native"; | ||
|
||
export const useItemStyle = (isSingleCard: boolean, isFirstItem: boolean, isLastItem: boolean) => { | ||
const { colors } = useTheme(); | ||
|
||
const stylesMap = { | ||
singleCard: { | ||
borderRadius: 12, | ||
}, | ||
firstStackCard: { | ||
borderTopLeftRadius: 12, | ||
borderTopRightRadius: 12, | ||
}, | ||
lastStackCard: { | ||
borderBottomLeftRadius: 12, | ||
borderBottomRightRadius: 12, | ||
borderTopWidth: 1, | ||
borderTopColor: colors.opacityDefault.c10, | ||
borderBottomColor: colors.opacityDefault.c10, | ||
}, | ||
middleCards: { | ||
borderTopWidth: 1, | ||
borderTopColor: colors.opacityDefault.c10, | ||
borderBottomColor: colors.opacityDefault.c10, | ||
}, | ||
}; | ||
|
||
if (isSingleCard) return stylesMap.singleCard; | ||
|
||
if (isLastItem) return stylesMap.lastStackCard; | ||
|
||
if (isFirstItem) return stylesMap.firstStackCard; | ||
|
||
return stylesMap.middleCards; | ||
}; |
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