
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
custom-component-testing
Advanced tools
import {Autocomplete} from 'custom-component-testing';
function App() {
const recipes = [
{ id: 1, name: "Pasta" },
{ id: 2, name: "Pizza" },
{ id: 3, name: "Salad" }
];
return (
<Autocomplete
options={recipes}
label="Search for recipes..."
name="search"
onChange={(val) => console.log("Typed:", val)}
onSelect={(val) => console.log("Selected:", val)}
/>
);
}
import {Button} from 'custom-component-testing';
function App() {
return (
<Button
type="primary"
size="large"
startIcon="https://example.com/icon.png"
onClick={() => console.log("Clicked!")}
borderRadius="rounded"
customDesign={{ backgroundColor: "#007bff" }}
>
Click Me
</Button>
);
}
| Prop | Type | Description | Example |
|---|---|---|---|
type | string (optional) | Button style type (e.g., "primary", "secondary", "disabled"). | "primary" |
onClick | () => void (optional) | Callback when the button is clicked. | () => console.log("Clicked!") |
startIcon | string (optional) | Path or URL to an image displayed before the button text. | "/assets/arrow-left.svg" |
endIcon | string (optional) | Path or URL to an image displayed after the button text. | "/assets/arrow-right.svg" |
borderRadius | string (optional) | Controls border radius. Should match a class in index.module.css. | "normal" or "rounded" |
customDesign | React.CSSProperties (optional) | Inline custom styles applied to the button wrapper. | { backgroundColor: "#007bff" } |
children | ReactNode (optional) | Content/text inside the button. | "Submit" or <span>Save</span> |
size | string (optional) | Adjusts size via CSS module class. Should match your class names. | "small", "normal", "large" |
| Prop | Type | Description | Example |
|---|---|---|---|
options | Recipe[] (optional) | Array of static suggestion objects, e.g., { id: number, name: string }. | [ { id: 1, name: "Pizza" } ] |
fetchOptions | (query: string) => void (optional) | Async function to fetch suggestions dynamically based on the input query. | (query) => fetchData(query) |
label | string | Placeholder text displayed inside the input field. | "Search for recipes..." |
name | string | Name attribute for the input field (used for forms). | "search" |
onChange | (val?: string) => void | Callback triggered when the input value changes. | (val) => console.log("Typed:", val) |
onSelect | (val?: string) => void | Callback triggered when a suggestion is selected from the dropdown. | (val) => console.log("Selected:", val) |
FAQs
Testing of new library with typescript
The npm package custom-component-testing receives a total of 0 weekly downloads. As such, custom-component-testing popularity was classified as not popular.
We found that custom-component-testing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.