diff --git a/packages/react/components/chips/Chips.tsx b/packages/react/components/chips/Chips.tsx index e9b87365..abb329e5 100644 --- a/packages/react/components/chips/Chips.tsx +++ b/packages/react/components/chips/Chips.tsx @@ -1,9 +1,9 @@ -import React from "react" -import { is } from "@/services" -import { ChipsProps } from "./ChipsProps" -import clsx from "clsx" -import { hashClass } from "@/helpers" -import { useTrilogyContext } from "@/context" +import React from 'react' +import { is } from '@/services' +import { ChipsProps } from './ChipsProps' +import clsx from 'clsx' +import { hashClass } from '@/helpers' +import { useTrilogyContext } from '@/context' /** * Chips Component - has to be in a ChipsList component @@ -17,38 +17,13 @@ import { useTrilogyContext } from "@/context" * @param testId {string} Test Id for Test Integration * @param others */ -const Chips = ({ - className, - onClick, - children, - active, - disabled, - id, - ...others -}: ChipsProps): JSX.Element => { +const Chips = ({ className, children, active = false, disabled, id, ...others }: ChipsProps): JSX.Element => { const { styled } = useTrilogyContext() - const classes = hashClass( - styled, - clsx( - "chips", - active && is("active"), - className - ) - ) + const classes = hashClass(styled, clsx('chips', active && is('active'), className)) return ( - ) diff --git a/packages/react/components/chips/ChipsProps.ts b/packages/react/components/chips/ChipsProps.ts index 4bdf57e9..25481aa1 100644 --- a/packages/react/components/chips/ChipsProps.ts +++ b/packages/react/components/chips/ChipsProps.ts @@ -6,7 +6,7 @@ import { CommonProps } from '../../objects/facets/CommonProps' * Chips Interface */ export interface ChipsProps extends Clickable, Accessibility, Dev, CommonProps { - children: string | React.ReactNode + children: React.ReactNode onClick?: ClickEvent active?: boolean disabled?: boolean diff --git a/packages/react/components/chips/list/ChipsListProps.ts b/packages/react/components/chips/list/ChipsListProps.ts index 57726c49..8adc0277 100644 --- a/packages/react/components/chips/list/ChipsListProps.ts +++ b/packages/react/components/chips/list/ChipsListProps.ts @@ -4,7 +4,7 @@ import { CommonProps } from '../../../objects/facets/CommonProps' export interface ChipsListProps extends CommonProps { - children?: React.ReactNode | React.ReactElement + children?: React.ReactNode multiple?: boolean scrollable?: boolean }