This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { onMount } from "svelte"; | |
// Text to display | |
export let text = ""; | |
// <Typerwiter paused … /> to start paused | |
export let paused = false; | |
// <Typerwiter cursor … /> to show blinking cursor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
import { fly } from "svelte/transition"; | |
import { teleport } from "$lib/teleport"; | |
export let isOpen = false; | |
// Usage | |
// <Dropdown up right> | |
// <button slot="trigger">Toggle</button> | |
// <div slot="menu">Content</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
did:3:kjzl6cwe1jw146xqv0dh4zllis0314a7st0mbx1dd910m3dlgkisxie5vtfpknd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.CardGrid { | |
width: 1280px !important; | |
height: auto !important; | |
margin: 0 auto; | |
display: grid !important; | |
grid-gap: 40px; | |
grid-template-columns: repeat(4, 290px); | |
grid-template-rows: auto; | |
align-items: stretch !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InstaStories.swift | |
// SwiftUITests | |
// | |
// Created by Fabio Giolito on 23/06/2019. | |
// Copyright © 2019 Fabio Giolito. All rights reserved. | |
// | |
import Combine | |
import SwiftUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// FacebookReactions.swift | |
// | |
// Created by Fabio Giolito on 10/06/2019. | |
// Follow me: https://twitter.com/fabiogiolito | |
// | |
import SwiftUI | |
struct FacebookReactions : View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InstagramFeed.swift | |
// Landmarks | |
// | |
// Created by Fabio Giolito on 04/06/2019. | |
// Copyright © 2019 Apple. All rights reserved. | |
// | |
// =================================================== | |
// This is just a quick UI test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// InstagramFeed.swift | |
// Landmarks | |
// | |
// Created by Fabio Giolito on 04/06/2019. | |
// Copyright © 2019 Apple. All rights reserved. | |
// | |
// =================================================== | |
// This is just a quick UI test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UILabel { | |
func setLineSpacing(lineSpacing: CGFloat) { | |
let text = self.text | |
if let text = text { | |
let attributeString = NSMutableAttributedString(string: text) | |
let style = NSMutableParagraphStyle() | |
style.lineSpacing = lineSpacing | |
style.alignment = self.textAlignment | |
attributeString.addAttribute(NSAttributedString.Key.paragraphStyle, value: style, range: NSMakeRange(0, text.count)) | |
self.attributedText = attributeString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let btn1 = StyledButton(text: "Regular") | |
let btn2 = StyledButton(text: "Tint primary wide", styles: [.tintPrimary, .wide]) | |
let btn3 = StyledButton(text: "Primary large", styles: [.primary, .large]) | |
let btn4 = StyledButton(text: "Large", styles: [.large]) | |
let btn5 = StyledButton(text: "Label Button", styles: [.label, .tintPrimary]) | |
let btn6 = StyledButton(text: "Secondary", styles: [.secondary]) | |
let btn7 = StyledButton(text: "Tag", styles: [.tag]) | |
let btn8 = StyledButton(text: "Vertical", image: UIImage(named: "circle"), styles: [.iconVertical, .tintSecondary]) | |
let btn9 = StyledButton(text: "With icon", image: UIImage(named: "circle"), styles: [.iconHorizontal]) | |
let btn10 = StyledButton(image: UIImage(named: "star")) |
NewerOlder