This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const legacy = require('zigbee-herdsman-converters/lib/legacy'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const constants = require('zigbee-herdsman-converters/lib/constants'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const extend = require('zigbee-herdsman-converters/lib/extend'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const lumi = require('zigbee-herdsman-converters/lib/lumi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const legacy = require('zigbee-herdsman-converters/lib/legacy'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const constants = require('zigbee-herdsman-converters/lib/constants'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const extend = require('zigbee-herdsman-converters/lib/extend'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const lumi = require('zigbee-herdsman-converters/lib/lumi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const legacy = require('zigbee-herdsman-converters/lib/legacy'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const constants = require('zigbee-herdsman-converters/lib/constants'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const extend = require('zigbee-herdsman-converters/lib/extend'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const lumi = require('zigbee-herdsman-converters/lib/lumi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const legacy = require('zigbee-herdsman-converters/lib/legacy'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const constants = require('zigbee-herdsman-converters/lib/constants'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const extend = require('zigbee-herdsman-converters/lib/extend'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const lumi = require('zigbee-herdsman-converters/lib/lumi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const exposes = require('zigbee-herdsman-converters/lib/exposes'); | |
const fz = require('zigbee-herdsman-converters/converters/fromZigbee'); | |
const legacy = require('zigbee-herdsman-converters/lib/legacy'); | |
const tz = require('zigbee-herdsman-converters/converters/toZigbee'); | |
const constants = require('zigbee-herdsman-converters/lib/constants'); | |
const reporting = require('zigbee-herdsman-converters/lib/reporting'); | |
const extend = require('zigbee-herdsman-converters/lib/extend'); | |
const utils = require('zigbee-herdsman-converters/lib/utils'); | |
const globalStore = require('zigbee-herdsman-converters/lib/store'); | |
const lumi = require('zigbee-herdsman-converters/lib/lumi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct StockPriceText: View { | |
class Context: ObservableObject { | |
var lastPrice: Double? | |
@Published var color: Color = Color.black | |
var timer: Timer? | |
} | |
var price: Double | |
@StateObject var context = Context() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct StockPriceText: View { | |
class Context: ObservableObject { | |
var lastPrice: Double? | |
@Published var color: Color = Color.black | |
} | |
var price: Double | |
@StateObject var context = Context() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
@State var price: Double = 100.0 | |
var body: some View { | |
VStack(spacing: 16) { | |
StockPriceText(price: self.price).font(.title) | |
HStack { | |
Button("Down") { | |
price = price - 1 | |
} | |
Button("Up") { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum MaterialColor { | |
case accent | |
case primary | |
case secondary | |
case success | |
case danger | |
case warning | |
case info | |
case light |
NewerOlder