Skip to content

Commit

Permalink
[sparkle] - chore(Popover): export portal (#10724)
Browse files Browse the repository at this point in the history
* [sparkle] - feature: expose PopoverPortal component for exports

 - Added PopoverPortal to the list of components exported from Popover.tsx
 - Updated the main component index to include PopoverPortal in the public API

* [sparkle] - fix: bump package version after changes

 - Incremented the package version to reflect recent changes for publishing

[front] - refactor: streamline import statements in EmojiPicker component

 - Consolidated multiple import lines from React into a single line to simplify the code
 - Altered import path for `AvatarPickerTabElement` and `SelectedEmojiType` to be more concise

* fix: lint/format
  • Loading branch information
JulesBelveze authored Feb 12, 2025
1 parent 747c57a commit e43f65e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import {
Popover,
} from "@dust-tt/sparkle";
import { generateTailwindBackgroundColors } from "@dust-tt/types";
import React, { useEffect } from "react";
import { useImperativeHandle, useRef, useState } from "react";
import React, { useEffect, useImperativeHandle, useRef, useState } from "react";

import type {
AvatarPickerTabElement,
Expand Down
4 changes: 2 additions & 2 deletions sparkle/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sparkle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dust-tt/sparkle",
"version": "0.2.393",
"version": "0.2.394",
"scripts": {
"build": "rm -rf dist && npm run tailwind && npm run build:esm && npm run build:cjs",
"tailwind": "tailwindcss -i ./src/styles/tailwind.css -o dist/sparkle.css",
Expand Down
4 changes: 3 additions & 1 deletion sparkle/src/components/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const PopoverRoot = PopoverPrimitive.Root;

const PopoverTrigger = PopoverPrimitive.Trigger;

const PopoverPortal = PopoverPrimitive.Portal;

interface PopoverContentProps
extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
fullWidth?: boolean;
Expand Down Expand Up @@ -72,4 +74,4 @@ function Popover({

PopoverContent.displayName = PopoverPrimitive.Content.displayName;

export { Popover, PopoverContent, PopoverRoot, PopoverTrigger };
export { Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger };
1 change: 1 addition & 0 deletions sparkle/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export { Pagination } from "./Pagination";
export {
Popover,
PopoverContent,
PopoverPortal,
PopoverRoot,
PopoverTrigger,
} from "./Popover";
Expand Down

0 comments on commit e43f65e

Please sign in to comment.