File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
packages/lib/src/plugins/mui Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 3838 - using ` return ` object with ` schema ` property for callback return values
3939
4040* New (MUI) components
41+ - ` LinearProgress `
4142 - ` Switch `
4243
4344## Version 0.0.29 (from 2024/11/26)
Original file line number Diff line number Diff line change 1+ import { describe , it , expect } from "vitest" ;
2+ import { render , screen } from "@testing-library/react" ;
3+ import { LinearProgress } from "./LinearProgress" ;
4+
5+ describe ( "LinearProgress" , ( ) => {
6+ it ( "should render the LinearProgress component" , ( ) => {
7+ render (
8+ < LinearProgress
9+ type = "LinearProgress"
10+ id = "cp"
11+ value = { 75 }
12+ onChange = { ( ) => { } }
13+ /> ,
14+ ) ;
15+ // to inspect rendered component, do:
16+ // expect(document.querySelector("#cp")).toEqual({});
17+ expect ( screen . getByRole ( "progressbar" ) ) . not . toBeUndefined ( ) ;
18+ } ) ;
19+ } ) ;
Original file line number Diff line number Diff line change 1+ import MuiLinearProgress from "@mui/material/LinearProgress" ;
2+
3+ import type { ComponentState , ComponentProps } from "@/index" ;
4+
5+ interface LinearProgressState extends ComponentState {
6+ value ?: number ;
7+ valueBuffer ?: number ;
8+ variant ?: "determinate" | "indeterminate" | "buffer" | "query" ;
9+ }
10+
11+ interface LinearProgressProps extends ComponentProps , LinearProgressState { }
12+
13+ export function LinearProgress ( {
14+ id,
15+ style,
16+ value,
17+ variant,
18+ } : LinearProgressProps ) {
19+ return (
20+ < MuiLinearProgress id = { id } style = { style } value = { value } variant = { variant } />
21+ ) ;
22+ }
You can’t perform that action at this time.
0 commit comments