-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
How to apply modifier to button? #152
Comments
hello @alelordelo are you sure its the background of the button and not For iOS:Inside
For macOS:in
Together with your button change, otherwise this happens: Hope this helps and let me know if I can close this issue :) |
I will introduce a style concept in later versions, where we'll be able to inject library-specific styles into the environment. Button styles won't work consistently, since some component needs to apply specific button styles within the components. |
I strongly believe the API of the RichTextKit (at least the core part) is so scalable, that it is easier (and more convenient) for API consumers not to use and try to modify the existing components but to create their own SwiftUI components where they inject just the context as In my other project, I created custom toolbar which accept the If you can wait, I will create Demo example and post it in here (or in the project) with description how to use context in order to create Api-Consumer UIViews. but the basic idea is:
where: ANYWAY! All possibilities.
Hope this helps! |
Thanks again @DominikBucher12 ! 1 - this is what I am doing atm. But there are so many layers of abstraction that even applying a simple button modifier is super hard. 3- would be super helpful if you can point how to inject a button modifier for ex. |
How are we on this issue? |
On the code bellow, I can apply a modifier to the buttonStyle:
.buttonStyle(.plain)
It gets added to the preview:
But when I build the app, it shows the default button style.
How can I apply a modifier and change the button style?
The text was updated successfully, but these errors were encountered: