You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
617 B
26 lines
617 B
import PostEditor from '@/components/PostEditor' |
|
import { PencilLine } from 'lucide-react' |
|
import { useState } from 'react' |
|
import SidebarItem from './SidebarItem' |
|
|
|
export default function PostButton() { |
|
const [open, setOpen] = useState(false) |
|
|
|
return ( |
|
<> |
|
<SidebarItem |
|
title="New post" |
|
description="Post" |
|
onClick={(e) => { |
|
e.stopPropagation() |
|
setOpen(true) |
|
}} |
|
variant="default" |
|
className="bg-primary" |
|
> |
|
<PencilLine strokeWidth={3} /> |
|
</SidebarItem> |
|
<PostEditor open={open} setOpen={setOpen} /> |
|
</> |
|
) |
|
}
|
|
|