Skip to content

Instantly share code, notes, and snippets.

View kazuooooo's full-sized avatar
:octocat:
Taking a closer look, wombat!

kazuwombat kazuooooo

:octocat:
Taking a closer look, wombat!
View GitHub Profile
import Foundation
import SwiftUI
import PositionScrollView
/// Extended ScrollView which can controll position
public struct MinimalHorizontalExample: View, PositionScrollViewDelegate {
/// Page size of Scroll
var pageSize = CGSize(width: 200, height: 300)
// Create PositionScrollViewModel
import Foundation
import SwiftUI
/// Extended ScrollView which can controll position
public struct MinimalHorizontalExample: View, PositionScrollViewDelegate {
/// Page size of Scroll
var pageSize = CGSize(width: 200, height: 300)
// Create PositionScrollViewModel
// (Need to create in parent view to bind the state between this view and PositionScrollView)
@kazuooooo
kazuooooo / swift
Created September 4, 2020 04:02
PositionScrollViewSample.swift
import Foundation
import SwiftUI
/// Extended ScrollView which can controll position
public struct MinimalHorizontalExample: View, PositionScrollViewDelegate {
/// Page size of Scroll
var pageSize = CGSize(width: 200, height: 300)
// Create PositionScrollViewModel
// (Need to create in parent view to bind the state between this view and PositionScrollView)
const webhook = new IncomingWebhook("https://hooks.slack.com/services/your_web_hook_url");
{
"projects": {
"default": "your_project_id_here"
}
}
import React from "react"
import { ContactForm } from '@kazuwombat/fire-form'
import config from '../firebaseConfig'
const ContactPage = () => {
return (
<ContactForm
config={config}
successCallback={() => {
alert("success :)") /* You need to handle success */
import React from "react"
import { ContactForm } from '@kazuwombat/fire-form'
import config from '../firebaseConfig'
const ContactPage = () => {
return (
<ContactForm
config={config}
successCallback={() => { alert("success :)") /* You need to handle success. */
}}
export default {
apiKey: "xxxxxxx",
authDomain: "xxxxxxx",
databaseURL: "xxxxxxx",
projectId: "xxxxxxx",
storageBucket: "xxxxxxx",
messagingSenderId: "xxxxxxx",
appId: "xxxxxxx",
measurementId: "xxxxxxx"
};
@kazuooooo
kazuooooo / rule.json
Created August 27, 2020 03:11
fire-form database rule
{
"rules": {
".read": false,
".write": true
}
}
Button("+", action: {
// Call ViewModel countUp method
self.counterViewModel.countUp()
})