Skip to content

Instantly share code, notes, and snippets.

View nathanyoung's full-sized avatar
💭
Designing in code

Nathan Young nathanyoung

💭
Designing in code
View GitHub Profile
@nathanyoung
nathanyoung / Heading.js
Last active July 24, 2017 19:50
Tag Agnostic heading styled component
import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
const Title = styled.h1`
font-family: vars(--sans-serif);
line-height: 1;
margin: 0 0 2rem 0;
font-size: ${props =>
props.fontSize === "super"
@nathanyoung
nathanyoung / button.tsx
Created August 25, 2018 05:57
Framer X Code Component
import * as React from "react";
import { PropertyControls, ControlType } from "framer";
interface Props {
label: string;
className: string;
onClick: () => void;
type: "default" | "primary" | "outline";
disabled: boolean;
}
<Block
className={className}
border={{ side: 'all', width: '4px', color: 'red-light' }}
background="red-lighter"
direction="column"
itemSpacing="5"
padding="5"
radius={!isMobile ? 3 : null}
>
<Heading element="4">Danger Zone</Heading>

import Heading from './Heading'; import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks'; import { PALMETTO_FONT_SIZE_OPTIONS, PALMETTO_BRAND_COLOR_OPTIONS } from '../../lib/tokens'; import { HEADING_LEVELS } from './Heading.constants';

<Meta title="Components/Heading" component={Heading} argTypes={{ color: { control: { type: 'select', options: PALMETTO_BRAND_COLOR_OPTIONS } },