ui icon indicating copy to clipboard operation
ui copied to clipboard

feat: added close x button icon to popover

Open HoshangDEV opened this issue 1 year ago • 1 comments

Hi there, I tried to use popover component, But it seemes there is no x button or a popover close button inside popover component, I googled it, It seems people using useState's to achive a close button, But because there is already a better way to close the popover I tried to add the x and close button.

Previous view: Screenshot 2024-09-07 003653

HoshangDEV avatar Sep 06 '24 21:09 HoshangDEV

@HoshangDEV is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 06 '24 21:09 vercel[bot]

@HoshangDEV Could we document this instead? Let's add an example to the popover docs page.

shadcn avatar Sep 15 '24 08:09 shadcn

@shadcn I create an example with close button in the docs, And created another component for that example in apps\www\registry\default\example\popover-close-button.tsx,

and also modified this file apps\www\registry\registry-examples.ts and added this block code :

 {
    name: "popover-close-button",
    type: "registry:example",
    registryDependencies: ["popover"],
    files: ["example/popover-close-button.tsx"],
  },

but when i run the application i get Component popover-close-button not found in registry, i tried to run the command pnpm run build:registry and fixed the problem, but after running this command also there is some issue, it make changes to over 1000 files, most of the files have not changed but it appears in the git files changes,

so there is another command for achiving this or what I did was the right way?

image

HoshangDEV avatar Sep 15 '24 11:09 HoshangDEV