Slide 42
Slide 42 text
6*σβΠϯγεςϜ J04࣮
static func reactionByColorAndElevation(
shape: Shape,
overlayType: Reactioned,
backgroundColor: Reactioned,
normalStateElevation: BlackOrWhite
) -> SurfaceProps {
.init(
shape: shape,
overlay: .init(
normal: .clear,
pressed: overlayType.pressed.alpha100,
focused: overlayType.focused.alpha50,
disabled: overlayType.disabled.alpha100
),
backgroundColor: backgroundColor,
elevation: normalStateElevation.overriding(...
normal: normalStateElevation.value + 0,
pressed: normalStateElevation.value + 4,
focused: normalStateElevation.value + 4,
disabled: nil
))