Skip to content

Instantly share code, notes, and snippets.

View almayox's full-sized avatar

Almayo Ibrahim almayox

View GitHub Profile
struct SideBarStack<SidebarContent: View, Content: View>: View {
let sidebarContent: SidebarContent
let mainContent: Content
let sidebarWidth: CGFloat
@Binding var showSidebar: Bool
init(sidebarWidth: CGFloat, showSidebar: Binding<Bool>, @ViewBuilder sidebar: ()->SidebarContent, @ViewBuilder content: ()->Content) {
self.sidebarWidth = sidebarWidth
self._showSidebar = showSidebar
@jboullianne
jboullianne / ProductCard.swift
Last active February 13, 2023 11:45
SwiftUI Card designed for Food Products
//
// ProductCard.swift
// FoodProductCard
//
// Created by Jean-Marc Boullianne on 11/17/19.
// Copyright © 2019 Jean-Marc Boullianne. All rights reserved.
//
import SwiftUI