-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#400] Create Link component #401
base: develop
Are you sure you want to change the base?
Conversation
de33c42
to
70a7fd9
Compare
@@ -58,25 +62,36 @@ final class ButtonConfigurationModel: ComponentConfiguration { | |||
} | |||
} | |||
|
|||
private var coloredSurfaceCodeModifier: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a moyen de faire plus simple sans if/else/return mais avec une expression ternaire :
onColoredSurface ? ".oudsColoredSurface(color: Color.orange)" : ""
@@ -88,14 +72,13 @@ private struct ButtonDemo: View { | |||
@Environment(\.theme) private var theme | |||
|
|||
@StateObject var model: ButtonConfigurationModel | |||
let coloredSurface: Bool | |||
|
|||
var body: some View { | |||
HStack(alignment: .center) { | |||
Spacer() | |||
|
|||
// It is not allowed to place a Negative bnutton on colored surface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
button au lieu de bnutton
@@ -112,6 +95,6 @@ private struct ButtonDemo: View { | |||
} | |||
.disabled(!model.enabled) | |||
.padding(.all, theme.spaces.spaceFixedMedium) | |||
.modifier(BackgroundModifier(coloredSurface: coloredSurface)) | |||
.modifier(DesignToolColoredBackgroundModifier(coloredSurface: model.onColoredSurface)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DesignToolboxColoredBackgroundModifier au lieu de DesignToolColoredBackgroundModifier
|
||
// MARK: Initializer | ||
|
||
override init() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas besoin de faire des appels à self
ici
|
||
// MARK: Component Configuration | ||
|
||
private var coloredSurfaceCodeModifier: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il y a moyen de faire plus simple sans if/else/return mais avec une expression ternaire :
onColoredSurface ? ".oudsColoredSurface(color: Color.orange)" : ""
} | ||
} | ||
|
||
// MARK: - Button Layout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Link" Layout plutôt ?
self.action = action | ||
} | ||
|
||
/// Create a link with an `Arrow` before `OUDSLink.Arrow.back` or after `OUDSLink.Arrow.Next` the text. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas compris ta phrase
import Foundation | ||
|
||
extension Bundle { | ||
/// The ouds bundle, useful to find resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"OUDS" et non "ouds"
} | ||
} | ||
|
||
struct LinkUnderlineModifier: ViewModifier { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pourquoi LinkUnderlineModifier
n'est pas dans un fichier à part ? Ou alors renommer le fichier qui ne doit plus être "LinktextModifier.swift"
@ludovic35 in the link component the option "on colored background" is defaulted to off. This is good. |
I will fix that. Additional rermarks from designer review:
|
Note: Please transform
- [ ]
into- (NA)
in the description when things are not applicableRelated issues
Description
Motivation & Context
Types of change
Previews
Checklist
Contribution
Accessibility
Design
Development
Documentation
Checklist (for Core Team only)