Skip to content

Commit 62bb809

Browse files
committed
update styles of new comment
1 parent 6bc3847 commit 62bb809

File tree

7 files changed

+38
-8
lines changed

7 files changed

+38
-8
lines changed

src/components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function Card({
99
}) {
1010
return (
1111
<div
12-
className={` ${classes || ''} p-4 bg-white dark:bg-dark-700 rounded-lg`}
12+
className={` ${classes || ''} p-4 bg-white dark:bg-dark-700 rounded-md`}
1313
>
1414
{children}
1515
</div>

src/components/UserDetails/Bio.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { GoPencil } from '@react-icons/all-files/go/GoPencil'
33
import { GoCheck } from '@react-icons/all-files/go/GoCheck'
44
import { graphql, useFragment, useMutation } from 'react-relay'
55
import { Bio_user$key } from '../../queries/__generated__/Bio_user.graphql'
6+
import ExpandingTextarea from '../ExpandingTextarea'
67

78
type BioProps = {
89
user: Bio_user$key
@@ -62,7 +63,7 @@ const Bio = ({ user }: BioProps) => {
6263
) : (
6364
<div className="flex justify-between">
6465
<span>{data.bio}</span>
65-
<button onClick={() => setEditMode(true)}>
66+
<button className="ml-4" onClick={() => setEditMode(true)}>
6667
<GoPencil />
6768
</button>
6869
</div>

src/components/comment/NewComment.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ export default function NewComment({ storyId, refetch }: NewCommentProps) {
3030
},
3131
onCompleted: () => {
3232
refetch({}, { fetchPolicy: 'network-only' })
33+
setComment('')
3334
},
3435
})
3536
}
3637

3738
return (
38-
<div className="w-full dark:text-gray-300 dark:bg-dark-600 flex flex-col items-end">
39-
<div className="textarea-container w-full">
39+
<div className="w-full dark:text-gray-300 dark:bg-dark-600 flex flex-col items-end rounded-md">
40+
<div className="textarea-container w-full p-4">
4041
<ExpandingTextarea
4142
value={comment}
4243
setValue={setComment}

src/components/feed/StoryPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const StoryPreview = ({ story }: StoryPreviewProps) => {
3232

3333
return (
3434
<ErrorBoundary FallbackComponent={ErrorFallback}>
35-
<div className="my-8 mr-2 flex flex-col bg-white dark:bg-dark-700 rounded-lg">
35+
<div className="my-8 mr-2 flex flex-col bg-white dark:bg-dark-700 rounded-md">
3636
<div>
3737
{data.thumbnail ? (
3838
<img className="cover-image" src={data.thumbnail} alt="" />

src/components/feed/UserSnippet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const UserSnippet = ({ user }: UserSnippetProps) => {
2828
<img
2929
src={data.avatar}
3030
alt={`${data.handle}'s avatar`}
31-
className="w-16 h-16 rounded-full -mt-8 border-4 dark:border-dark-700"
31+
className="w-16 h-16 rounded-full -mt-8 border-4 dark:border-dark-700 bg-white dark:bg-dark-500"
3232
/>
3333
<div className="flex flex-row mt-2">
3434
<Link href={`/@${data.handle}`}>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react'
2+
import { ComponentStory, ComponentMeta } from '@storybook/react'
3+
import ExpandingTextarea from '../components/ExpandingTextarea'
4+
5+
export default {
6+
title: 'Atoms/ExpandingTextarea',
7+
component: ExpandingTextarea,
8+
} as ComponentMeta<typeof ExpandingTextarea>
9+
10+
const Template: ComponentStory<typeof ExpandingTextarea> = (args) => (
11+
<ExpandingTextarea {...args} />
12+
)
13+
14+
export const Primary = Template.bind({})
15+
Primary.args = {
16+
value: 'All your base are belong to us',
17+
setValue: () => {
18+
undefined
19+
},
20+
}

src/stories/Hexagon.stories.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ export default {
88
component: Hexagon,
99
} as ComponentMeta<typeof Hexagon>
1010

11+
const Template: ComponentStory<typeof Hexagon> = (args) => <Hexagon {...args} />
12+
1113
export const AllColors = () => (
12-
<>
14+
<div className="flex flex-wrap justify-between">
1315
<Hexagon color="green-dark" size="4">
1416
Green Dark
1517
</Hexagon>
@@ -46,7 +48,7 @@ export const AllColors = () => (
4648
<Hexagon color="gold" size="4">
4749
Gold
4850
</Hexagon>
49-
</>
51+
</div>
5052
)
5153

5254
export const Sizes1to8 = () => (
@@ -77,3 +79,9 @@ export const Sizes1to8 = () => (
7779
</Hexagon>
7880
</>
7981
)
82+
83+
export const Basic = Template.bind({})
84+
Basic.args = {
85+
color: 'red',
86+
size: '4',
87+
}

0 commit comments

Comments
 (0)