Skip to content

Commit

Permalink
Merge pull request #90 from gsoft-inc/feature/89
Browse files Browse the repository at this point in the history
Add tag slot to the tag component
  • Loading branch information
alexasselin008 authored Feb 28, 2024
2 parents de87811 + c5c13d6 commit 84519f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/tidy-wasps-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@orbit-ui/transition-components": patch
"@workleap/orbiter-ui": patch
---

Add tag slot to the tag component
6 changes: 3 additions & 3 deletions packages/components/src/tag/src/Tag.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from "../../box";
import { ComponentProps, ReactNode, SyntheticEvent, forwardRef, useMemo } from "react";
import { CrossButton } from "../../button";
import { InteractionProps, InternalProps, OmitInternalProps, StyledComponentProps, createSizeAdapter, cssModule, isNil, mergeProps, normalizeSize, useMergedRefs, useSlots, createEmbeddableAdapter } from "../../shared";
import { InteractionProps, InternalProps, OmitInternalProps, StyledComponentProps, createSizeAdapter, cssModule, isNil, mergeProps, normalizeSize, useMergedRefs, useSlots, createEmbeddableAdapter, slot } from "../../shared";
import { ResponsiveProp, useResponsiveValue } from "../../styling";
import { Text } from "../../typography";
import { useFieldInputProps } from "../../field";
Expand Down Expand Up @@ -165,9 +165,9 @@ InnerTag.defaultElement = DefaultElement;
*
* [Documentation](https://wl-orbiter-website.netlify.app/?path=/docs/tag--default-story)
*/
export const Tag = forwardRef<any, OmitInternalProps<InnerTagProps>>((props, ref) => (
export const Tag = slot("tag", forwardRef<any, OmitInternalProps<InnerTagProps>>((props, ref) => (
<InnerTag {...props} forwardedRef={ref} />
));
)));

export type TagProps = ComponentProps<typeof Tag>;

0 comments on commit 84519f7

Please sign in to comment.