-
Notifications
You must be signed in to change notification settings - Fork 663
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8384f51
commit 08e0af6
Showing
6 changed files
with
151 additions
and
23 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
paymentsheet/src/main/java/com/stripe/android/link/ui/LinkLogoutMenuItem.kt
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,12 @@ | ||
package com.stripe.android.link.ui | ||
|
||
import com.stripe.android.link.ui.menus.LinkMenuItem | ||
import com.stripe.android.paymentsheet.R | ||
|
||
internal sealed class LinkLogoutMenuItem( | ||
override val textResId: Int, | ||
override val isDestructive: Boolean = false | ||
) : LinkMenuItem { | ||
data object Logout : LinkLogoutMenuItem(textResId = R.string.stripe_log_out, isDestructive = true) | ||
data object Cancel : LinkLogoutMenuItem(textResId = com.stripe.android.R.string.stripe_cancel) | ||
} |
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
12 changes: 12 additions & 0 deletions
12
paymentsheet/src/main/java/com/stripe/android/link/ui/menus/LinkMenuItem.kt
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,12 @@ | ||
package com.stripe.android.link.ui.menus | ||
|
||
/** | ||
* An item to be displayed in a [LinkMenu]. | ||
* | ||
* @property textResId The resource ID of the text of the item | ||
* @property isDestructive Whether this item should be rendered with the error text color | ||
*/ | ||
internal interface LinkMenuItem { | ||
val textResId: Int | ||
val isDestructive: Boolean | ||
} |
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 |
---|---|---|
|
@@ -40,4 +40,4 @@ internal class LinkLogoutSheetScreenshotTest { | |
) | ||
} | ||
} | ||
} | ||
} |