diff --git a/README.md b/README.md index 13d4e734f..2976995c3 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,3 @@ styled-components-website ├── utils/ # Various utilities use across the site └── vendor/ # Cached dependencies ``` - -### Got stuck? - -Feel free to ping us on [Spectrum](https://spectrum.chat/styled-components/website) if you get stuck somewhere while trying to make this website better, let's resolve it together! diff --git a/components/Layout.js b/components/Layout.ts similarity index 84% rename from components/Layout.js rename to components/Layout.ts index 3c3b71f5c..727ac2238 100644 --- a/components/Layout.js +++ b/components/Layout.ts @@ -13,7 +13,7 @@ export const Container = styled.div` `)}; `; -export const Content = styled.div` +export const Content = styled.div<{ $hero: boolean; $moveRight: boolean }>` max-width: 100%; margin: 0; padding: ${rem(90)} ${rem(60)} 0 ${rem(60)}; @@ -26,10 +26,11 @@ export const Content = styled.div` max-width: 80ch; } - ${mobile(css` - padding: ${rem(100)} ${rem(20)} ${rem(30)} ${rem(20)}; - transform: translateX(${p => (p.$moveRight ? rem(sidebarWidth) : 0)}); - `)}; + ${p => + mobile(css` + padding: ${rem(100)} ${rem(20)} ${rem(30)} ${rem(20)}; + transform: translateX(${p.$moveRight ? rem(sidebarWidth) : 0}); + `)}; ${p => p.$hero && diff --git a/components/Nav/Social.js b/components/Nav/Social.js index 77a85ee4d..c414c2e1d 100644 --- a/components/Nav/Social.js +++ b/components/Nav/Social.js @@ -41,11 +41,6 @@ const SocialLink = styled(Link).attrs((/* props */) => ({ } `; -const Svg = styled.svg` - width: ${p => rem(Number(p.width))}; - height: ${p => rem(Number(p.height))}; -`; - const StyledIcon = styled.div` && { width: ${p => rem(Number(p.width))}; @@ -63,21 +58,8 @@ const StyledIcon = styled.div` // // ) -const Spectrum = () => ( - - spectrum - - -); - const Social = props => ( - - - {/* */} diff --git a/sections/tooling/stylelint.md b/sections/tooling/stylelint.md index 9654de944..0b3a7f58d 100644 --- a/sections/tooling/stylelint.md +++ b/sections/tooling/stylelint.md @@ -173,7 +173,7 @@ The full list of supported tags: - `sc-property` - `sc-value` -> If you are in doubt of the vocabulary you can refer to [this CSS vocabulary list](http://apps.workflower.fi/vocabs/css/en) with examples. +> If you are in doubt of the vocabulary you can refer to [this CSS vocabulary list](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference) with examples. For example, when you interpolate another styled component, what you really interpolate is its unique selector. Since the processor doesn't know that, you can tell it to replace it with a selector when linting: diff --git a/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap b/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap index a90d19900..aa1a76fe2 100644 --- a/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap +++ b/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap @@ -78,12 +78,7 @@ exports[`MobileNavbar renders correctly 1`] = ` fill: currentColor; } -.c17 { - width: 0.7777777777777778rem; - height: 0.7777777777777778rem; -} - -.c18.c18 { +.c17.c17 { width: NaNrem; height: 1rem; } @@ -297,33 +292,13 @@ exports[`MobileNavbar renders correctly 1`] = `