Skip to content

Commit

Permalink
feat: add classname prop
Browse files Browse the repository at this point in the history
  • Loading branch information
Arucard89 committed Mar 1, 2024
1 parent d4ae6a6 commit 8571c37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import './SelectCounter.scss';
const b = block('select-counter');

export const SelectCounter = React.forwardRef(function SelectCouner(
{count, size}: SelectCounterProps,
{count, size, className}: SelectCounterProps,
ref: React.ForwardedRef<HTMLDivElement>,
) {
return (
<div className={b({size})} ref={ref}>
<div className={b({size}, className)} ref={ref}>
<Text variant={size === 'xl' ? 'body-2' : 'body-1'}>{count}</Text>
</div>
);
Expand Down
4 changes: 4 additions & 0 deletions src/components/Select/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,12 @@ export type SelectClearProps = SelectClearIconProps & {
};

export type SelectCounterProps = {
/** number of selected elements to show */
count: number;
/** size of the parent elemnent */
size: SelectSize;
/** additional classname for component */
className?: string;
};

export type SelectOptions<T = any> = NonNullable<SelectProps<T>['options']>;

0 comments on commit 8571c37

Please sign in to comment.