File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # NebraskaCoder Components
2+
3+ These are the components used throughout the web app.
Original file line number Diff line number Diff line change 1+ import { ReactNode } from "react" ;
2+
3+ interface ButtonProps {
4+ children : ReactNode ;
5+ }
6+
7+ const Button = ( { children } : ButtonProps ) => {
8+ return < button > { children } </ button > ;
9+ } ;
10+
11+ export default Button ;
Original file line number Diff line number Diff line change 1+ # NebraskaCoder Controls
2+
3+ Basic controls with standardized styles and formatting.
Original file line number Diff line number Diff line change 1+ import Button from "@components/controls/Button" ;
2+ import { render } from "@testing-library/react" ;
3+
4+ describe ( "Button Component" , ( ) => {
5+ test ( "renders" , ( ) => {
6+ const { getByRole } = render ( < Button > Test Button</ Button > ) ;
7+
8+ const targetButton = getByRole ( "button" , { name : "Test Button" } ) ;
9+
10+ expect ( targetButton ) . toBeInTheDocument ( ) ;
11+ } ) ;
12+ } ) ;
You can’t perform that action at this time.
0 commit comments