Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Fix previews in MessageCard Composable #27579

Closed
MozillaNoah opened this issue Oct 27, 2022 · 0 comments · Fixed by #27600, fork-house/fenix#14, Leland-Takamine/fenix#159 or nathanmkaya/fenix#108
Assignees
Labels
compose Tickets involving Composable changes eng:health Improve code health
Milestone

Comments

@MozillaNoah
Copy link
Contributor

MozillaNoah commented Oct 27, 2022

The MessageCard Composable currently takes in a Nimbus-driven object which breaks the previews, when the Composable really only needs three elements:

  1. Title text
  2. Message text
  3. Button text

The message: Message parameter should be refactored so only the actual text is passed-in.

@Composable
fun MessageCard(
    titleText: String?,
    messageText: String?,
    buttonText: String?,
    onClick: () -> Unit,
    onCloseButtonClick: () -> Unit,
) {
   ...
}

┆Issue is synchronized with this Jira Task

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.