Skip to content

Instantly share code, notes, and snippets.

const text = css({
color: '$gray12',
variants: {
size: {
// corrective letter-spacing and text-indent styles
// should go here too, because they're determined by font-size.
// You could also put line-height here too, if your devs prefer
// a default line-height that works in some cases. But understand
// that line-height is also a function of line-length, so the
import { sliderprimitive } from "@modulz/primitives";
const Slider = sliderprimitive();
const { Thumb, InnerTrack, Track } = Slider;
Slider.style({
[Track]: {
borderRadius: "3px",
backgroundColor: "gainsboro",
},
import React from "react";
import { cssReset, CssResetTagName } from "../utils/cssReset";
import { withInteropStyledSystem } from "@interop/styled-system";
const defaultRenderElement = "button";
type ButtonDOMProps = React.ComponentPropsWithRef<typeof defaultRenderElement>;
type ButtonOwnProps = {};
type ButtonProps = ButtonDOMProps &
ButtonOwnProps & { as?: React.ElementType<any> };
const Text = styled.p`
// Styles unique to this component
color: ${theme.GRAY_900};
// Props unique to this component
${p => p.size1 && css`
font-size: ${theme.FONTSIZE_200};
def show
@website = Website.find(params[:id])
@page = Page.new
unless @website.user_id == current_user.id
flash[:error] = "Oi, stop snooping around!"
redirect_to current_user
end
unless params[:id] == @website.to_param
<div class="Card">
<div class="styleguide-example">
<span class="Status green">Paid</span>
<span class="Status yellow">Pending</span>
<span class="Status red">Late Payment</span>
</div>
```html
<span class="Status green">Complete</span>
<span class="Status yellow">Pending</span>
<span class="Status red">Late Payment</span>
<div class="Card">
<div class="styleguide-example">
<span class="Status Status-green">Paid</span>
<span class="Status Status-yellow">Pending</span>
<span class="Status Status-red">Late Payment</span>
</div>
```html
<span class="Status Status-green">Complete</span>
<span class="Status Status-yellow">Pending</span>
export default class InputGroup extends React.Component {
render(){
return (
<div>
<Spacing type="padding" position="bottom" size="small">
<InputLabel>Full name</InputLabel>
</Spacing>
<Input type="text" placeholder="Full name"></Input>
<Spacing type="margin" position="top" size="small">
<Text size="small" color="lightGray">A little hint below the input</Text>
.euRYzy,
.oEaCQ,
.bJrroZ,
.fgYRvT {
display: -webkit-box;
display: -moz-box;
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
display: inline-flex;
align-items: center;
.euRYzy {
display: -webkit-box;
display: -moz-box;
display: -ms-inline-flexbox;
display: -webkit-inline-flex;
display: inline-flex;
align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;