}
}
}
}
</pre>
=====@Binding使用時のPreview=====
*@Stateかつ、staticで宣言
*$で変数を渡す
<pre>
struct HostView_Previews: PreviewProvider {
@State static var isAlert = true
static var previews: some View {
let host = WoL.Host(host: "test.local", ip: "192.168.0.1", macaddr: "aa:bb:cc:dd:ee:ff", comment: "")
HostView(host: host, isAlert: $isAlert)
}
}