{"id":22362647,"url":"https://github.com/fluidgroup/buttonstylemodifier","last_synced_at":"2026-05-01T10:31:56.376Z","repository":{"id":265263793,"uuid":"895541438","full_name":"FluidGroup/ButtonStyleModifier","owner":"FluidGroup","description":"An easier way to make a button style with closure or passing an instance of ViewModifier.","archived":false,"fork":false,"pushed_at":"2024-11-28T15:26:54.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T15:16:56.533Z","etag":null,"topics":["button","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluidGroup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-28T12:01:42.000Z","updated_at":"2024-11-28T15:31:00.000Z","dependencies_parsed_at":"2024-11-28T16:32:42.601Z","dependency_job_id":null,"html_url":"https://github.com/FluidGroup/ButtonStyleModifier","commit_stats":null,"previous_names":["fluidgroup/buttonstylemodifier"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FButtonStyleModifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FButtonStyleModifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FButtonStyleModifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2FButtonStyleModifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/ButtonStyleModifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245678900,"owners_count":20654738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button","swiftui"],"created_at":"2024-12-04T17:10:05.764Z","updated_at":"2026-05-01T10:31:56.322Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"An easier way to make a button style with closure or passing an instance of `ViewModifier`.\n\n```swift\nButton(\"Button\") {\n  print(\"\")\n}\n.buttonStyle(\n  ButtonStyleModifier { label, state in\n    label\n      .padding()\n      .background(\n        RoundedRectangle(cornerRadius: .infinity, style: .continuous)                \n          .foregroundColor(Color.secondary)\n      )\n      .opacity(state.isEnabled ? 1 : 0.3)\n}\n```\n\n`ButtonStyleModifier` supports indicating state of processing by `.processing()` modifier.  \nThis state can be read from state parameter in ButtonStyleModifier.\n\nButtonStyleModifier sets the following environment values for making styles in ViewModifier.\n\n```swift\nextension EnvironmentValues {\n  @Entry public var _styled_isPressed: Bool = false\n\n  @Entry public var _styled_isProcessing: Bool = false\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fbuttonstylemodifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fbuttonstylemodifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fbuttonstylemodifier/lists"}