MCPcopy Index your code
hub / github.com/nukeop/nuclear / SelectError

Function SelectError

packages/ui/src/components/Select/SelectError.tsx:5–17  ·  view source on GitHub ↗
({ error })

Source from the content-addressed store, hash-verified

3import { useSelectContext } from './context';
4
5export const SelectError: FC<{ error?: string }> = ({ error }) => {
6 const {
7 ids: { errorId },
8 } = useSelectContext();
9 if (!error) {
10 return null;
11 }
12 return (
13 <p id={errorId} className="text-accent-red text-xs select-none">
14 {error}
15 </p>
16 );
17};

Callers

nothing calls this directly

Calls 1

useSelectContextFunction · 0.90

Tested by

no test coverage detected