Created
January 24, 2017 15:17
-
-
Save carl0zen/29ef67857fa874f07fd737e2bdbdc97d to your computer and use it in GitHub Desktop.
Logo Component Example Using BEM and Styled Components
This file contains 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 React from "react" | |
import styled from "styled-components" | |
import { Icon } from "../ui/icon" | |
import { theme } from "../ui/theme" | |
const { color } = theme | |
const Logo = styled(Icon)` | |
.logo { | |
&__light{ | |
&--small, | |
&--medium, | |
&--large { | |
fill: ${color.yellow}; | |
} | |
} | |
&__heart { | |
&--left { | |
fill: ${color.primary}; | |
opacity: 0.95; | |
} | |
&--right { | |
fill: ${color.primary}; | |
opacity: 0.8; | |
} | |
} | |
} | |
` | |
export default ({size, ...props}) => ( | |
<Logo name="logo" size={size || "7vmax"} {...props} /> | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment