scrimba
Styled Components
Animations
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
Animations
Expand for more info
components
Content.js
run
preview
console
import React from 'react'
import styled from 'styled-components'
import Button from './Button'
import Icon from './Icon'


const Title = styled.h1`
color: #aaecf0;
`
const Section = styled.div`
background-color: #aac9f0;
display: flex;
justify-content: center;
flex-direction: column;
border-radius: 15px;
`

const SubTitle = styled(Title)`
font-size: 12px;
align-self: center;
`;

const ParagraphTitle = styled(SubTitle)`
color: grey;
`;

const ReversedTitle = props =>
<ParagraphTitle {...props} children={props.children.split('').reverse()} />

const Content = () => {
return (
<Section>
<Title>💅🏻 Section</Title>
<SubTitle>I am a subtitle</SubTitle>
<Button text='me first' primary/>
<Button text='me second'/>
<Icon border='solid 3px' statusColor={'steady'} />
<Icon status='in-progress'/>
<ParagraphTitle as={ReversedTitle} >I am a paragraph title</ParagraphTitle>
</Section>
)
}

export default Content

//Mini Challenge
//Can you make the Section Title rotate 360 degress on page instead?
Console
/index.html
-5:49