This commit is contained in:
Aakiyaru 2025-05-28 13:25:55 +07:00
parent d28f4b0817
commit 5cd48e0a66
3 changed files with 70 additions and 0 deletions

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

View 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))
}