Skip to content

Instantly share code, notes, and snippets.

View davo's full-sized avatar
🦮
Golden

Davo Galavotti davo

🦮
Golden
View GitHub Profile
@davo
davo / Grid.tsx
Last active September 15, 2018 16:28
CSS Grid for Framer X
import * as React from 'react'
const container: React.CSSProperties = {
width: '100%',
height: '100%',
display: 'grid',
gridTemplateColumns: '10rem 10rem 10rem 10rem'
}
const item: React.CSSProperties = {
@davo
davo / MaterialIcon.tsx
Last active August 17, 2018 04:53
Framer X - Material Icon Component via Styled Components
import * as React from 'react'
import { ControlType } from 'framer'
import styled, { injectGlobal } from 'styled-components'
injectGlobal`
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
`
interface iconProps {
stretch: boolean
import * as React from 'react'
import { Frame, PropertyControls, ControlType } from 'framer'
interface Props {
color: string
}
export class componentName extends React.Component<Props> {
static defaultProps = {
width: 1600,
@davo
davo / open-safari-tabs-in-chrome.scpt
Created August 12, 2018 17:34 — forked from paulirish/open-chrome-tabs-in-safari.scpt
Open Safari tabs in Google Chrome
tell application "Safari"
set tab_list to every tab in the front window
repeat with the_tab in tab_list
set the_url to the URL of the_tab
tell application "Google Chrome" to open location the_url
end repeat
end tell
@davo
davo / LineChart.tsx
Created August 6, 2018 03:50
LineChart Component for Framer X (based on VX)
import * as React from 'react'
import { Frame, Size, PropertyControls, ControlType } from 'framer'
import { AreaClosed, Line, Bar } from '@vx/shape'
import { appleStock } from '@vx/mock-data'
import { curveMonotoneX } from '@vx/curve'
import { LinearGradient } from '@vx/gradient'
// import { GridRows, GridColumns } from '@vx/grid'
import { scaleTime, scaleLinear } from '@vx/scale'
// import { withTooltip, Tooltip } from '@vx/tooltip'
@davo
davo / Figma.tsx
Created August 5, 2018 15:01
Figma Live Embed for Framer X
/**
* @module FigmaLiveEmbed
* @author Davo Galavotti
* @version 0.1
*
* Based on Youtube code component by Jan Van Boghout
*/
import * as React from 'react'
import { Frame, FramerEvent, Animatable, PropertyControls, ControlType } from 'framer'
@davo
davo / readme.md
Last active July 30, 2018 19:50
Variable Fonts Experiments with Framer
@davo
davo / iframe.js
Created July 24, 2018 19:22
Iframe Component for Catalog
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import PropTypes from 'prop-types'
class Iframe extends Component {
static propTypes: Object = {
src: PropTypes.string.isRequired,
onLoad: PropTypes.func,
}
@davo
davo / cheatsheet.js
Created July 23, 2018 14:59
Debugging the DOM using the Dev Console
document.getElementsByTagName("h2").length
@davo
davo / hide.sh
Created June 15, 2018 17:03
Hide desktop on Mac
defaults write com.apple.finder CreateDesktop false
killall Finder
defaults write com.apple.finder CreateDesktop true