fd
This commit is contained in:
parent
d28f4b0817
commit
5cd48e0a66
21
Sources/UIKitComponents/Media.xcassets/dismiss.imageset/Contents.json
vendored
Normal file
21
Sources/UIKitComponents/Media.xcassets/dismiss.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "dismiss_24.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
Sources/UIKitComponents/Media.xcassets/dismiss.imageset/dismiss_24.png
vendored
Normal file
BIN
Sources/UIKitComponents/Media.xcassets/dismiss.imageset/dismiss_24.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 638 B |
49
Sources/UIKitComponents/SnackBar/SnackBarView.swift
Normal file
49
Sources/UIKitComponents/SnackBar/SnackBarView.swift
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
//
|
||||||
|
// SwiftUIView.swift
|
||||||
|
// UIKitComponents
|
||||||
|
//
|
||||||
|
// Created by User on 28.05.2025.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
public struct SnackBarView: View {
|
||||||
|
|
||||||
|
@Binding var isShow: Bool
|
||||||
|
|
||||||
|
public init(isShow: Binding<Bool>) {
|
||||||
|
self._isShow = isShow
|
||||||
|
}
|
||||||
|
|
||||||
|
public var body: some View {
|
||||||
|
ZStack(alignment: .topLeading) {
|
||||||
|
Color.white
|
||||||
|
.frame(height: 120)
|
||||||
|
.cornerRadius(8)
|
||||||
|
Text("Произошла ошибка\nНу вот опять")
|
||||||
|
.robotoFlex(size: 20, font: .black)
|
||||||
|
.tracking(0.38)
|
||||||
|
.lineSpacing(2.8)
|
||||||
|
.padding(.top, 24)
|
||||||
|
.padding(.leading, 20)
|
||||||
|
HStack {
|
||||||
|
Spacer()
|
||||||
|
Button {
|
||||||
|
isShow = false
|
||||||
|
print("no")
|
||||||
|
} label: {
|
||||||
|
Image("dismiss", bundle: .module)
|
||||||
|
.offset(y: -14)
|
||||||
|
.offset(x: 11)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}.frame(maxWidth: .infinity)
|
||||||
|
.padding()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#Preview {
|
||||||
|
SnackBarView(isShow: .constant(true))
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user