liveview-native / liveview-client-swiftui

MIT License
349 stars 29 forks source link

Treat boolean attributes as true if present and != "false" #1367

Closed carson-katri closed 1 month ago

carson-katri commented 1 month ago

This updates the check for boolean attributes so the following cases work:

<!-- true -->
<Element isOn />
<Element isOn="true" />
<Element isOn={true} />
<Element isOn="123" />
<Element isOn="any value" />

<!-- false -->
<Element />
<Element isOn="false" />
<Element isOn={false} />