-
Notifications
You must be signed in to change notification settings - Fork 0
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 #28 from crobox/components
Conveniences for retrieving Text and Image badges
- Loading branch information
Showing
8 changed files
with
57 additions
and
60 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,23 +1,41 @@ | ||
package com.crobox.sdk.domain | ||
|
||
enum class PromotionContentType { ImageBadge, TextBadge } | ||
|
||
interface PromotionContentConfig { | ||
val contentType: PromotionContentType | ||
val name: String | ||
} | ||
|
||
data class ImageBadge( | ||
/// Image url | ||
val image: String, | ||
|
||
/// Alternate Text | ||
val altText: String? | ||
) | ||
val altText: String?, | ||
|
||
/// Component name | ||
override val name: String, | ||
|
||
data class TextBadge ( | ||
) : PromotionContentConfig { | ||
override val contentType: PromotionContentType = PromotionContentType.ImageBadge | ||
} | ||
|
||
data class TextBadge( | ||
/// Text message | ||
val text: String, | ||
|
||
/// Font color | ||
val fontColor: String, | ||
val fontColor: String?, | ||
|
||
/// Background color | ||
val backgroundColor: String?, | ||
|
||
/// Border color | ||
val borderColor: String? | ||
) | ||
val borderColor: String?, | ||
|
||
/// Component name | ||
override val name: String | ||
) : PromotionContentConfig { | ||
override val contentType: PromotionContentType = PromotionContentType.TextBadge | ||
} |
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 was deleted.
Oops, something went wrong.