From 2cc69ff37e6278968e696aa6a8ed5b2dea5f3b01 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Fri, 22 May 2020 15:36:55 -0700 Subject: [PATCH 1/2] Add flex primitive, replace all instances of grid --- package.json | 2 + src/components/AMAQuestions/AskQuestion.tsx | 6 +- src/components/AMAQuestions/EditQuestion.tsx | 24 ++--- .../AMAQuestions/PendingQuestions.tsx | 5 +- src/components/AMAQuestions/QuestionItem.tsx | 22 ++--- .../AMAQuestions/QuestionReaction.tsx | 9 +- src/components/AMAQuestions/index.tsx | 9 +- src/components/Bookmarks/AddBookmark.tsx | 6 +- src/components/Bookmarks/BookmarkListItem.tsx | 34 ++++--- src/components/Bookmarks/BookmarkReaction.tsx | 10 +- .../Bookmarks/EditingBookmarkListItem.tsx | 24 ++--- src/components/Bookmarks/index.tsx | 6 +- src/components/DesignDetailView/index.tsx | 75 ++++++++------- src/components/DesignDetailsGrid/index.tsx | 6 +- src/components/FigmaPlugins/index.tsx | 26 ++--- src/components/Flex/index.tsx | 40 ++++++++ src/components/HNPost/Comment.tsx | 1 - src/components/HNPost/index.tsx | 10 +- src/components/HNPosts/Navigation.tsx | 6 +- src/components/HNPosts/PostListItem.tsx | 6 +- src/components/HNPosts/index.tsx | 6 +- src/components/Overthought/List/index.tsx | 10 +- src/components/Overthought/Post/index.tsx | 35 ++----- src/components/Overthought/Post/style.tsx | 1 - src/components/PodcastEpisodesList/index.tsx | 10 +- src/graphql/queries/posts.ts | 3 - src/pages/about.tsx | 21 ++-- src/pages/ama.tsx | 8 +- src/pages/bookmarks.tsx | 6 +- src/pages/design-details/index.tsx | 33 ++++--- src/pages/hn/about.tsx | 10 +- src/pages/hn/best.tsx | 6 +- src/pages/hn/index.tsx | 6 +- src/pages/index.tsx | 95 ++++++++++--------- src/pages/overthought/[slug].tsx | 5 +- src/pages/overthought/index.tsx | 31 +++--- yarn.lock | 76 ++++++++++++++- 37 files changed, 390 insertions(+), 299 deletions(-) create mode 100644 src/components/Flex/index.tsx diff --git a/package.json b/package.json index 528ecc78e..00afd9c56 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "react-markdown": "^4.3.1", "react-visibility-sensor": "^5.1.1", "rebass": "^4.0.7", + "reflexbox": "^4.0.6", "rehype-parse": "^6.0.2", "rehype-remark": "^8.0.0", "remark-stringify": "^8.0.0", @@ -55,6 +56,7 @@ "string-replace-to-array": "^1.0.3", "styled-components": "^4.4.1", "terser": "^4.7.0", + "theme-ui": "^0.3.1", "throttle-debounce": "^2.1.0", "timeago.js": "^4.0.2", "twilio": "^3.43.1", diff --git a/src/components/AMAQuestions/AskQuestion.tsx b/src/components/AMAQuestions/AskQuestion.tsx index f2b0f65c6..6d1b1d8c6 100644 --- a/src/components/AMAQuestions/AskQuestion.tsx +++ b/src/components/AMAQuestions/AskQuestion.tsx @@ -1,9 +1,9 @@ import * as React from 'react' import { useAddAmaQuestionMutation } from '~/graphql/types.generated' import { Small } from '~/components/Typography' -import Grid from '../Grid' import Textarea from '../Textarea' import { PrimaryButton } from '../Button' +import Flex from '../Flex' export default function AddBookmark() { const [question, setQuestion] = React.useState('') @@ -40,7 +40,7 @@ export default function AddBookmark() { } return ( - +