This file contains hidden or 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
module.exports = theo => { | |
theo.registerFormat('ios.color.swift', result => { | |
return `🎉`; | |
}); | |
} |
This file contains hidden or 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
/* Default page background */ | |
export const colorGray10 = "#f7f7f7"; | |
/* ClassPass' key brand color */ | |
export const colorBrand = "#0055ff"; |
This file contains hidden or 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
"scripts": { | |
"web": "theo colors.yml - transform web - format scss > colors.scss", | |
"js": "theo color.yml - format module.js > colors.js", | |
"all": "yarn web && yarn js" | |
} |
This file contains hidden or 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
/* Default page background */ | |
$color-gray10: rgb(247, 247, 247); | |
/* ClassPass' key brand color */ | |
$color-brand: rgb(0, 85, 255); |
This file contains hidden or 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
"scripts": { | |
"web": "theo colors.yml - transform web - format scss > colors.scss" | |
} |
This file contains hidden or 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
global: | |
type: color | |
category: color | |
props: | |
colorGray10: | |
value: "#f7f7f7" | |
comment: Default page background | |
colorBrand: | |
value: "#0055ff" | |
comment: ClassPass' key brand color |
This file contains hidden or 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
{ | |
"dependencies": { | |
"theo": "salesforce-ux/theo" | |
} | |
} |
This file contains hidden or 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 UIEdgeInsets { | |
static var zero: UIEdgeInsets { | |
return UIEdgeInsetsZero | |
} | |
} | |
// Inspired by "Many Controllers Make Light Work" by Soroush Khanlou | |
// http://khanlou.com/2016/02/many-controllers/ | |
class KeyboardManagerViewController: UIViewController { | |
let scrollView: UIScrollView |
This file contains hidden or 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
import UIKit | |
public func draw(size: CGSize, drawBlock: (CGContext) -> ()) -> UIImage? { | |
UIGraphicsBeginImageContextWithOptions(size, true, 0.0) | |
defer { | |
UIGraphicsEndImageContext() | |
} | |
guard let context = UIGraphicsGetCurrentContext() else { | |
return nil |