Skip to content

Commit 1338da5

Browse files
committed
chore: migrate to goober
1 parent 5ac2b1f commit 1338da5

File tree

14 files changed

+393
-175
lines changed

14 files changed

+393
-175
lines changed

playground/app.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1+
import { setup } from 'goober';
12
import * as React from 'react';
23

34
import { WizardModule } from './modules';
45
import { Page, Style } from './modules/common';
56

7+
setup(React.createElement);
8+
69
const App = () => {
710
return (
811
<>

playground/components/asyncStep.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
import { useWizard } from '../../dist';
55
import { useMockMutation } from '../hooks';
@@ -31,7 +31,7 @@ const Container = styled('div')`
3131
align-items: center;
3232
`;
3333

34-
const P = styled.p`
34+
const P = styled('p')`
3535
color: white;
3636
`;
3737

playground/components/footer.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
import { useWizard } from '../../dist';
55
import { Button } from '../modules/common';
66

7-
const Actions = styled.div`
7+
const Actions = styled('div')`
88
display: grid;
99
justify-content: center;
1010
margin: 1rem 0;
1111
grid-template-columns: min-content min-content;
1212
gap: 1rem;
1313
`;
1414

15-
const Info = styled.div`
15+
const Info = styled('div')`
1616
display: flex;
1717
justify-content: center;
1818
gap: 1rem;

playground/components/step.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
import { useWizard } from '../../dist';
55

@@ -20,7 +20,7 @@ const Container = styled('div')`
2020
align-items: center;
2121
`;
2222

23-
const P = styled.p`
23+
const P = styled('p')`
2424
color: white;
2525
`;
2626

playground/components/tooltip.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
type Props = {
55
label: string;
66
};
77

8-
const Container = styled.div<Props>`
8+
const Container = styled('div')<Props>`
99
position: relative;
1010
height: 100%;
1111
width: 100%;

playground/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import 'react-app-polyfill/ie11';
2+
import './normalize.css';
23

34
import * as React from 'react';
45
import * as ReactDOM from 'react-dom';

playground/modules/common/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
type Props = {
55
label: string;
66
disabled: boolean;
77
} & React.HTMLAttributes<HTMLButtonElement>;
88

9-
const Container = styled.button`
9+
const Container = styled('button')`
1010
width: fit-content;
1111
min-width: 8rem;
1212
border: 1px solid var(--purple);

playground/modules/common/page.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
import githubLogoPath from '../../assets/images/githubLogo.svg';
55
import logoPath from '../../assets/images/logo.svg';
@@ -10,34 +10,34 @@ type Props = {
1010
children: React.ReactNode;
1111
};
1212

13-
const Container = styled.main`
13+
const Container = styled('main')`
1414
display: flex;
1515
justify-content: center;
1616
background: var(--dark);
1717
`;
1818

19-
const Wrapper = styled.div`
19+
const Wrapper = styled('div')`
2020
width: 100%;
2121
`;
2222

23-
const Body = styled.div`
23+
const Body = styled('div')`
2424
margin-top: 2rem;
2525
`;
2626

27-
const Description = styled.div`
27+
const Description = styled('div')`
2828
font-size: 1.1rem;
2929
font-weight: 200;
3030
`;
3131

32-
const Divider = styled.div`
32+
const Divider = styled('div')`
3333
height: 2px;
3434
width: 7%;
3535
background-image: linear-gradient(48.66deg, var(--purple), var(--blue));
3636
margin: 2.5rem 0;
3737
display: flex;
3838
`;
3939

40-
const TopBar = styled.header`
40+
const TopBar = styled('header')`
4141
position: sticky;
4242
top: 0;
4343
left: 0;
@@ -52,12 +52,12 @@ const TopBar = styled.header`
5252
z-index: 1000;
5353
`;
5454

55-
const Logo = styled.img`
55+
const Logo = styled('img')`
5656
height: 3rem;
5757
width: 3rem;
5858
`;
5959

60-
const GithubLogo = styled.img`
60+
const GithubLogo = styled('img')`
6161
width: 2rem;
6262
`;
6363

playground/modules/common/style.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
// @ts-ignore
2+
import { createGlobalStyles } from 'goober/global';
13
import * as React from 'react';
2-
import { createGlobalStyle } from 'styled-components';
3-
import { Normalize } from 'styled-normalize';
44

5-
const GlobalStyle = createGlobalStyle`
5+
const GlobalStyle = createGlobalStyles`
66
:root {
77
--light: #0b002b;
88
--nav: rgba(3, 0, 12, 0.5);
@@ -50,7 +50,6 @@ const GlobalStyle = createGlobalStyle`
5050

5151
const Style = () => (
5252
<>
53-
<Normalize />
5453
<GlobalStyle />
5554
</>
5655
);

playground/modules/wizard/wizard.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
import { styled } from 'goober';
12
import * as React from 'react';
2-
import styled from 'styled-components';
33

44
import { Wizard } from '../../../dist';
55
import { AnimatedStep, AsyncStep, Footer, Step } from '../../components';
66

7-
const Grid = styled.div`
7+
const Grid = styled('section')`
88
display: grid;
99
grid-template-columns: repeat(1, 1fr);
1010
width: 100%;
@@ -21,7 +21,7 @@ const Title = styled('h2')`
2121
}
2222
`;
2323

24-
const Item = styled.div`
24+
const Item = styled('div')`
2525
display: grid;
2626
grid-template-rows: min-content;
2727

0 commit comments

Comments
 (0)