Skip to content

Allow parameter value modification from a Story code #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
eymar opened this issue Feb 17, 2025 · 0 comments
Open

Allow parameter value modification from a Story code #45

eymar opened this issue Feb 17, 2025 · 0 comments

Comments

@eymar
Copy link
Collaborator

eymar commented Feb 17, 2025

For example:

val `Checkbox` by story {
    val checked by parameter(false)
    Checkbox(checked = checked, onCheckedChange = {
        checked = it // not possible because property delegate doesn't have setValue method
    })
}

One of the solutions might just be to accept a mutableState which would be used both in Story/Composable code and in modifiable Story parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant