Skip to content

Instantly share code, notes, and snippets.

<Stat>
<div>
<TeamRank marginRight={10}>#{away.team_rank}</TeamRank>
<StatValue>{away.stat_value}</StatValue>
</div>
<StatName>{away.stat_name}</StatName>
<div>
<StatValue>{home.stat_value}</StatValue>
const TeamRank = styled.span`
color: #333;
margin-left: ${(props) => props.marginLeft || 0}px;
margin-right: ${(props) => props.marginRight || 0}px;
font-family: "Noto Sans JP", sans-serif;
color: #777;
`;
const StatValue = styled.span`
color: white;
<Stat>
<div>
<TeamRank>#{away.team_rank}</TeamRank>
<StatValue>{away.stat_value}</StatValue>
</div>
<StatName>{away.stat_name}</StatName>
<div>
<StatValue>{home.stat_value}</StatValue>
@DZuz14
DZuz14 / index.jsx
Created February 9, 2021 19:07
stat
const Stat = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width: 100%;
`;
const TeamRank = styled.span`
const TeamRank = styled.span``;
const StatValue = styled.span``;
const StatName = styled.span``;
const StatRow = ({ stat }) => {
const { away, home } = stat;
return (
const TeamRank = styled.span``;
const StatValue = styled.span``;
const StatName = styled.span``;
const StatRow = ({ stat }) => {
const { away, home } = stat;
return <div></div>
}
{
stat_name: "opponent score",
stat_value: 473,
league_high: 519,
team_rank: 5
}
const StatRow = ({ stat }) => {
const { away, home } = stat;
return <div></div>
}
@DZuz14
DZuz14 / data.js
Last active February 9, 2021 17:58
mock away home data
[
{
away: {
stat_name: "score",
stat_value: 395,
league_high: 509,
team_rank: 17
},
home: {
stat_name: "score",
@DZuz14
DZuz14 / playbar.js
Created August 4, 2020 10:49
React Spotify P1 Playbar
/** @jsx jsx */
import React from 'react'
import { css, jsx } from '@emotion/core'
const Playbar = ({ children }) => (
<div
className="Playbar"
css={css`
position: absolute;
bottom: 0;