Skip to content

Commit

Permalink
fix(ui): item indicator vertical alignment in Select
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslaw-wlodek committed May 3, 2024
1 parent f031579 commit 1994bb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import React, { forwardRef } from 'react';
import { ReactComponent as CheckIcon } from '@lace/icons/dist/CheckComponent';
import * as Select from '@radix-ui/react-select';

import * as cx from './select-item-indicator.css';

/**
* https://www.radix-ui.com/primitives/docs/components/select#itemindicator
*/
export const ItemIndicator = forwardRef<HTMLSpanElement>(
({}, forwardReference) => (
<Select.ItemIndicator ref={forwardReference}>
<Select.ItemIndicator ref={forwardReference} className={cx.indicator}>
<CheckIcon />
</Select.ItemIndicator>
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { style } from '@vanilla-extract/css';

export const indicator = style({
display: 'inline-flex',
flexShrink: 0,
alignItems: 'center',
justifyContent: 'center',
});

0 comments on commit 1994bb1

Please sign in to comment.