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

New writing style #15

Merged
merged 4 commits into from Sep 20, 2023
Merged

New writing style #15

merged 4 commits into from Sep 20, 2023

Conversation

p-x9
Copy link
Owner

@p-x9 p-x9 commented Sep 19, 2023

closes #13

Currently, to get the color, write as follows:

Color.iOS.systemBackground

The following new writing methods are also available in this pull request.

Color.iOS(.systemBackground)

The new writing style looks simpler in the following cases:

var body: some View {
    Text("hello")
        .foregroundColor(.iOS(.darkText)) // New
        .foregroundColor(Color.iOS.darkText) // Old
}

The previous way of writing is also available at the same time.
Therefore, there is no need to modify the existing used parts

@p-x9 p-x9 merged commit aa42f45 into main Sep 20, 2023
@p-x9 p-x9 deleted the feature/new-writing-style branch September 20, 2023 02:27
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

Successfully merging this pull request may close these issues.

New Writing Style
1 participant