OneScript

disabled

Disable controls in a view hierarchy.

disabled(value) applies SwiftUI's enabled environment to the view and its descendants. A disabled Button does not run its App callback or Widget action.

import { Button, Modifier, Text } from "onescript/views"

<Button
  action={() => save()}
  modifier={Modifier.disabled(true)}
>
  <Text>Save</Text>
</Button>

How is this guide?

Last updated on