Removed variables to optimize code.
This commit is contained in:
parent
bea91920d6
commit
94deaeff60
@ -19,17 +19,11 @@
|
|||||||
private lazy var rightLabelStackItem: StackItem = {
|
private lazy var rightLabelStackItem: StackItem = {
|
||||||
return StackItem(andContain: rightLabel)
|
return StackItem(andContain: rightLabel)
|
||||||
}()
|
}()
|
||||||
private lazy var horizontalStackItems: [StackItem] = {
|
|
||||||
return [StackItem(andContain: leftHeadline), StackItem(andContain: heart), rightLabelStackItem]
|
|
||||||
}()
|
|
||||||
private lazy var horizontalStackModel: StackModel = {
|
|
||||||
return StackModel(molecules: [StackItemModel(horizontalAlignment: .fill),
|
|
||||||
StackItemModel(horizontalAlignment: .fill),
|
|
||||||
StackItemModel(horizontalAlignment: .trailing)],
|
|
||||||
axis: .horizontal, spacing: Padding.Two)
|
|
||||||
}()
|
|
||||||
public lazy var horizontalStack: Stack<StackModel> = {
|
public lazy var horizontalStack: Stack<StackModel> = {
|
||||||
return Stack<StackModel>(with: horizontalStackModel, stackItems: horizontalStackItems)
|
return Stack<StackModel>(with: StackModel(molecules: [StackItemModel(horizontalAlignment: .fill),
|
||||||
|
StackItemModel(horizontalAlignment: .fill),
|
||||||
|
StackItemModel(horizontalAlignment: .trailing)],
|
||||||
|
axis: .horizontal, spacing: Padding.Two), stackItems: [StackItem(andContain: leftHeadline), StackItem(andContain: heart), rightLabelStackItem])
|
||||||
}()
|
}()
|
||||||
public lazy var stack: Stack<StackModel> = {
|
public lazy var stack: Stack<StackModel> = {
|
||||||
return Stack<StackModel>.createStack(with: [horizontalStack, leftBody, leftSubBody], axis: .vertical, spacing: 0)
|
return Stack<StackModel>.createStack(with: [horizontalStack, leftBody, leftSubBody], axis: .vertical, spacing: 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user