Skip to content

Commit 61cd113

Browse files
lbogdanCompuIves
authored andcommitted
Homepage fixes. (codesandbox#781)
1 parent 7558c79 commit 61cd113

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

packages/homepage/src/components/Button.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import styled, { css } from 'styled-components';
23

34
const getGradient = color => css`linear-gradient(
@@ -29,4 +30,6 @@ export default styled.a`
2930
`};
3031
3132
text-decoration: none;
32-
`;
33+
`.withComponent(({ color, secondary, children, ...rest }) => (
34+
<a {...rest}>{children}</a>
35+
));

packages/homepage/src/components/Cube.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const Sides = styled.div`
3737
background-color: ${({ color }) => color.clearer(0.2)};
3838
border: ${({ size }) => size / 70}px solid rgba(255, 255, 255, 0.4);
3939
}
40-
`;
40+
`.withComponent(({ noAnimation, color, ...rest }) => <div {...rest} />);
4141

4242
const Side = styled.div`
4343
transform-origin: 50% 50%;

packages/homepage/src/screens/home/CycleFeature/Cube.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const Sides = styled.div`
2222
background-color: ${({ color }) => color.clearer(0.2)};
2323
border: ${({ size }) => size / 70}px solid rgba(255, 255, 255, 0.4);
2424
}
25-
`;
25+
`.withComponent(({ color, size, ...rest }) => <div {...rest} />);
2626

2727
const Side = styled.div`
2828
transform-origin: 50% 50%;
@@ -32,7 +32,6 @@ const Side = styled.div`
3232
type Props = {
3333
size: number,
3434
className: string,
35-
noAnimation: ?boolean,
3635
speed: number,
3736
color: string,
3837
offset: number,
@@ -45,20 +44,13 @@ export default class GlowCube extends React.Component<Props> {
4544
color = 'rgba(242,119,119,0.5)',
4645
speed = 1,
4746
offset = 0,
48-
noAnimation,
4947
className,
5048
ref,
5149
id,
5250
} = this.props;
5351
return (
5452
<Cube id={id} innerRef={ref} className={className} size={size}>
55-
<Sides
56-
color={color}
57-
offset={offset}
58-
speed={speed}
59-
noAnimation={noAnimation}
60-
size={size}
61-
>
53+
<Sides color={color} offset={offset} speed={speed} size={size}>
6254
<Side
6355
style={{ boxShadow: `0px 0px 100px ${color.clearer(0.3)()}` }}
6456
rotate="rotateX(90deg)"

packages/homepage/src/screens/home/Frameworks/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const Container = styled.div`
5252
margin-top: 1rem;
5353
height: 340px;
5454
`};
55-
`;
55+
`.withComponent(({ color, children, ...rest }) => (
56+
<div {...rest}>{children}</div>
57+
));
5658

5759
const Pane = styled(MaxWidth)`
5860
color: rgba(255, 255, 255, 0.8);
@@ -313,7 +315,7 @@ export default class Frameworks extends React.Component {
313315
}}
314316
updateCheck={template}
315317
>
316-
<TemplateName color={template.color}>
318+
<TemplateName>
317319
<TemplateIcon width={96} height={96} />
318320
<h4>{template.niceName}</h4>
319321
</TemplateName>
@@ -339,7 +341,7 @@ export default class Frameworks extends React.Component {
339341
</div>
340342

341343
<HeaderTitle>Supported Loaders</HeaderTitle>
342-
<TemplateIcons color={template.color}>
344+
<TemplateIcons>
343345
{TEMPLATE_SUPPORT[template.name].loaders.map((data, i) => (
344346
<FileType
345347
key={template.name + data.title}

0 commit comments

Comments
 (0)