chore: update prettier tab width for consistency (#175)

This commit is contained in:
41666 2021-03-13 22:54:34 -05:00 committed by GitHub
parent a931f8c69c
commit f24d2fcc99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
247 changed files with 7224 additions and 7375 deletions

View file

@ -2,69 +2,69 @@ import * as React from 'react';
import { Hero as HeroComponent } from './Hero';
export default {
title: 'Atoms/Hero',
component: HeroComponent,
args: {
topSpacing: 75,
bottomSpacing: 25,
},
title: 'Atoms/Hero',
component: HeroComponent,
args: {
topSpacing: 75,
bottomSpacing: 25,
},
};
export const Hero = ({ topSpacing, bottomSpacing }) => {
return (
<StoryWrapper topSpacing={topSpacing} bottomSpacing={bottomSpacing}>
<HeroComponent topSpacing={topSpacing} bottomSpacing={bottomSpacing}>
<h1>This is it.</h1>
</HeroComponent>
</StoryWrapper>
);
return (
<StoryWrapper topSpacing={topSpacing} bottomSpacing={bottomSpacing}>
<HeroComponent topSpacing={topSpacing} bottomSpacing={bottomSpacing}>
<h1>This is it.</h1>
</HeroComponent>
</StoryWrapper>
);
};
type WrapperProps = {
children: React.ReactNode;
topSpacing: number;
bottomSpacing: number;
children: React.ReactNode;
topSpacing: number;
bottomSpacing: number;
};
const StoryWrapper = ({ topSpacing, bottomSpacing, ...props }: WrapperProps) => (
<div>
<div
style={{
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
height: '100vh',
}}
>
<div
style={{
height: topSpacing,
backgroundColor: 'rgba(255,0,0,0.25)',
top: 0,
left: 0,
right: 0,
position: 'absolute',
overflow: 'hidden',
}}
>
topSpacing
</div>
<div
style={{
height: bottomSpacing,
backgroundColor: 'rgba(0,0,255,0.25)',
bottom: 0,
left: 0,
right: 0,
position: 'absolute',
overflow: 'hidden',
}}
>
bottomSpacing
</div>
</div>
{props.children}
<div>
<div
style={{
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
height: '100vh',
}}
>
<div
style={{
height: topSpacing,
backgroundColor: 'rgba(255,0,0,0.25)',
top: 0,
left: 0,
right: 0,
position: 'absolute',
overflow: 'hidden',
}}
>
topSpacing
</div>
<div
style={{
height: bottomSpacing,
backgroundColor: 'rgba(0,0,255,0.25)',
bottom: 0,
left: 0,
right: 0,
position: 'absolute',
overflow: 'hidden',
}}
>
bottomSpacing
</div>
</div>
{props.children}
</div>
);