diff --git a/apps/www/src/components/playground/popover-examples.tsx b/apps/www/src/components/playground/popover-examples.tsx index dfc03b1e6..663e43ebe 100644 --- a/apps/www/src/components/playground/popover-examples.tsx +++ b/apps/www/src/components/playground/popover-examples.tsx @@ -8,57 +8,43 @@ export function PopoverExamples() { - - - + }>Top Popover Content appears above the trigger - - - + }>Right Popover Content appears to the right - - - + }>Bottom Popover Content appears below the trigger - - - + }>Left Popover Content appears to the left - - - + }>Center Aligned Centered with the trigger - - - + }>Start Aligned Aligned to the start - - - + }>End Aligned Aligned to the end diff --git a/apps/www/src/components/popover-color-picker.tsx b/apps/www/src/components/popover-color-picker.tsx index d79c2c28b..5afeb9759 100644 --- a/apps/www/src/components/popover-color-picker.tsx +++ b/apps/www/src/components/popover-color-picker.tsx @@ -1,5 +1,4 @@ -import { Button, Flex, Popover } from '@raystack/apsara'; -import { ColorPicker } from '@raystack/apsara'; +import { Button, ColorPicker, Flex, Popover } from '@raystack/apsara'; import { useState } from 'react'; export default function PopoverColorPicker() { @@ -7,15 +6,17 @@ export default function PopoverColorPicker() { return ( - - - + }>Popover ${children} @@ -43,8 +41,8 @@ export const positionDemo = { name: 'Top', code: ` - - + }> + Top Popover Content appears above the trigger @@ -55,8 +53,8 @@ export const positionDemo = { name: 'Right', code: ` - - + }> + Right Popover Content appears to the right @@ -67,8 +65,8 @@ export const positionDemo = { name: 'Bottom', code: ` - - + }> + Bottom Popover Content appears below the trigger @@ -79,8 +77,8 @@ export const positionDemo = { name: 'Left', code: ` - - + }> + Left Popover Content appears to the left @@ -96,8 +94,8 @@ export const alignDemo = { name: 'Center', code: ` - - + }> + Center Aligned Centered with the trigger @@ -108,8 +106,8 @@ export const alignDemo = { name: 'Start', code: ` - - + }> + Start Aligned Aligned to the start @@ -120,8 +118,8 @@ export const alignDemo = { name: 'End', code: ` - - + }> + End Aligned Aligned to the end diff --git a/apps/www/src/content/docs/components/select/props.ts b/apps/www/src/content/docs/components/select/props.ts index 38f4ce661..08e2932b9 100644 --- a/apps/www/src/content/docs/components/select/props.ts +++ b/apps/www/src/content/docs/components/select/props.ts @@ -78,22 +78,37 @@ export interface SelectGroupProps { /** Additional CSS class names */ className?: string; - /** Boolean to merge props onto child element */ - asChild?: boolean; + /** + * Allows rendering as a different element. + * Accepts a React element or a function that receives props and returns an element. + * + * @remarks `ReactElement | function` + */ + render?: React.ReactElement; } export interface SelectLabelProps { /** Additional CSS class names */ className?: string; - /** Boolean to merge props onto child element */ - asChild?: boolean; + /** + * Allows rendering as a different element. + * Accepts a React element or a function that receives props and returns an element. + * + * @remarks `ReactElement | function` + */ + render?: React.ReactElement; } export interface SelectSeparatorProps { /** Additional CSS class names */ className?: string; - /** Boolean to merge props onto child element */ - asChild?: boolean; + /** + * Allows rendering as a different element. + * Accepts a React element or a function that receives props and returns an element. + * + * @remarks `ReactElement | function` + */ + render?: React.ReactElement; } diff --git a/packages/raystack/components/data-table/components/display-settings.tsx b/packages/raystack/components/data-table/components/display-settings.tsx index 40c19827d..c1aebe8ba 100644 --- a/packages/raystack/components/data-table/components/display-settings.tsx +++ b/packages/raystack/components/data-table/components/display-settings.tsx @@ -2,7 +2,7 @@ import { MixerHorizontalIcon } from '@radix-ui/react-icons'; -import { ReactNode } from 'react'; +import { isValidElement, ReactNode } from 'react'; import { Button } from '../../button'; import { Flex } from '../../flex'; import { Popover } from '../../popover'; @@ -85,7 +85,9 @@ export function DisplaySettings({ return ( - {trigger} + {trigger}} + />