Files
design-system/packages/design-system/src/components/Select.tsx
T
nathanduquet 5faf478c1e Étoffer la bibliothèque : Card, Badge, formulaires avancés, feedback, navigation
Ajoute Card, Badge, Checkbox, Radio, Select, Spinner, EmptyState, Dialog,
TabBar et Toolbar au package @napps/design-system, tous construits à partir
des tokens existants (fills, labels par opacité, deux familles de matière) —
aucune valeur ad hoc introduite.
2026-09-17 12:33:01 +02:00

21 lines
736 B
TypeScript

import { SelectHTMLAttributes, forwardRef } from 'react';
export type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
export const Select = forwardRef<HTMLSelectElement, SelectProps>(
({ className, ...props }, ref) => {
return (
<div className="select-wrapper">
<select ref={ref} className={['select', className].filter(Boolean).join(' ')} {...props} />
<span className="select-chevron" aria-hidden="true">
<svg width="10" height="10" viewBox="0 0 10 10" fill="none">
<path d="M1 3.5L5 7.5L9 3.5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</span>
</div>
);
}
);
Select.displayName = 'Select';