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

I cannot change color or add frame to image or text in Menu in style ! #80

Open
X901 opened this issue Mar 21, 2023 · 0 comments
Open

Comments

@X901
Copy link

X901 commented Mar 21, 2023

Hi,

1st : I notice that I cannot use Foreach
I hope this change in the future as what Apple did with SwiftUI Menu

2nd : I notice I cannot do any think with text or image

for example

 Templates.MenuButton(
                text: Text(option1.title),
                image:
                    Image(option1.imageName)
                        .resizable()
                        .foregroundColor(option1.isDestructive ? .red : .blue)
                        .scaledToFit()
                        .frame(width: 18, height: 18)
                    ) {
                        // do soomething
                }

I will get this error

Cannot convert value of type 'some View' to expected argument type 'Image?'

same issue will happened with Text

is there any way to fix this issue ?

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