scrimba
Netflix in React JS
Component Library Tree Shaking 🌳
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

Component Library Tree Shaking 🌳
AboutCommentsNotes
Component Library Tree Shaking 🌳
Expand for more info
src
components
jumbotron
index.js
run
preview
console
import React from 'react';
import { Container, Item, Inner, Title, SubTitle, Image, Pane } from './styles/jumbotron';

export default function Jumbotron({ children, direction = 'row', ...restProps }) {
return (
<Item {...restProps}>
<Inner direction={direction}>{children}</Inner>
</Item>
)
}

Jumbotron.Container = function JumbotronContainer({ children, ...restProps }) {
return <Container {...restProps}>{children}</Container>;
}

Jumbotron.Title = function JumbotronTitle({ children, ...restProps }) {
return <Title {...restProps}>{children}</Title>;
}

Jumbotron.SubTitle = function JumbotronSubTitle({ children, ...restProps }) {
return <SubTitle {...restProps}>{children}</SubTitle>;
}

Jumbotron.Pane = function JumbotronPane({ children, ...restProps }) {
return <Pane {...restProps}>{children}</Pane>;
}

Jumbotron.Image = function JumbotronImage({ ...restProps }) {
return <Image {...restProps } />;
}
Console
/
-8:01