Skip to content
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

Childless alternatives of CodeBlock, Heading can be removed #53

Open
halilozercan opened this issue Sep 9, 2021 · 0 comments
Open

Childless alternatives of CodeBlock, Heading can be removed #53

halilozercan opened this issue Sep 9, 2021 · 0 comments

Comments

@halilozercan
Copy link
Owner

CodeBlock and Heading have alternative overloads that take literal text content. These alternatives are proxies to actual implementation which takes composable children. Only child that is passed to actual composable is a Text(...).

This API style of having alternatives is no longer common in Compose, e.g. Button does not offer a label alternative. We should stick with slot API most of the time.

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