-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shared, iOS: Code blanks math expressions (#1163)
^ALTAPPS-1324
- Loading branch information
1 parent
2768d4a
commit b53ba7d
Showing
23 changed files
with
1,084 additions
and
157 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
26 changes: 26 additions & 0 deletions
26
...es/StepQuizSubmodules/StepQuizCodeBlanks/Views/StepQuizCodeBlanksCodeBlockChildView.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import shared | ||
import SwiftUI | ||
|
||
struct StepQuizCodeBlanksCodeBlockChildView: View { | ||
let child: StepQuizCodeBlanksViewStateCodeBlockChildItem | ||
|
||
let action: (StepQuizCodeBlanksViewStateCodeBlockChildItem) -> Void | ||
|
||
var body: some View { | ||
childView(child: child) | ||
.onTapGesture { | ||
action(child) | ||
} | ||
} | ||
|
||
@ViewBuilder | ||
private func childView( | ||
child: StepQuizCodeBlanksViewStateCodeBlockChildItem | ||
) -> some View { | ||
if let value = child.value { | ||
StepQuizCodeBlanksOptionView(text: value, isActive: child.isActive) | ||
} else { | ||
StepQuizCodeBlanksBlankView(style: .small, isActive: child.isActive) | ||
} | ||
} | ||
} |
This file contains 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
Oops, something went wrong.