Skip to content

Commit 550de07

Browse files
Merge pull request #235 from illusionalsagacity/fix-missing-id-prop
Fix missing id prop
2 parents 0b10f31 + 7f6a129 commit 550de07

39 files changed

+2125
-10
lines changed

examples/src/examples/ExampleAccordionSummary.bs.js

+105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
open Mui
2+
3+
@react.component
4+
let make = () => {
5+
let (expanded, setExpanded) = React.useState(_ => "")
6+
7+
let handleChange = (_event, isExpanded, panel) => {
8+
setExpanded(_ => isExpanded ? panel : "")
9+
}
10+
11+
<div>
12+
<Typography variant=H6> {"AccordionSummary Examples:"->React.string} </Typography>
13+
<Box >
14+
<Accordion expanded={expanded === "panel1"} onChange={(e, exp) => handleChange(e, exp, "panel1")}>
15+
<AccordionSummary
16+
id="accordion-summary-1"
17+
expandIcon={<span> {"⌄"->React.string} </span>}
18+
ariaControls="panel1a-content">
19+
<Typography> {"Accordion 1"->React.string} </Typography>
20+
</AccordionSummary>
21+
<AccordionDetails>
22+
<Typography>
23+
{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget."->React.string}
24+
</Typography>
25+
</AccordionDetails>
26+
</Accordion>
27+
<Accordion expanded={expanded === "panel2"} onChange={(e, exp) => handleChange(e, exp, "panel2")}>
28+
<AccordionSummary
29+
id="accordion-summary-2"
30+
expandIcon={<span> {"⌄"->React.string} </span>}
31+
ariaControls="panel2a-content">
32+
<Typography> {"Accordion 2"->React.string} </Typography>
33+
</AccordionSummary>
34+
<AccordionDetails>
35+
<Typography>
36+
{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget."->React.string}
37+
</Typography>
38+
</AccordionDetails>
39+
</Accordion>
40+
<Accordion disabled=true>
41+
<AccordionSummary
42+
id="accordion-summary-disabled"
43+
expandIcon={<span> {"⌄"->React.string} </span>}
44+
ariaControls="panel3a-content">
45+
<Typography> {"Disabled Accordion"->React.string} </Typography>
46+
</AccordionSummary>
47+
</Accordion>
48+
</Box>
49+
</div>
50+
}

examples/src/examples/ExampleAlert.bs.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/src/examples/ExampleAlert.res

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ open Mui
33
@react.component
44
let make = () => {
55
<div>
6-
<Alert severity=Error> {`This is an error alert — check it out!`->React.string} </Alert>
7-
<Alert severity=Warning> {`This is a warning alert — check it out!`->React.string} </Alert>
8-
<Alert severity=Info> {`This is an info alert — check it out!`->React.string} </Alert>
9-
<Alert severity=Success> {`This is a success alert — check it out!`->React.string} </Alert>
6+
<Alert id="error" severity=Error> {`This is an error alert — check it out!`->React.string} </Alert>
7+
<Alert id="warning" severity=Warning> {`This is a warning alert — check it out!`->React.string} </Alert>
8+
<Alert id="info" severity=Info> {`This is an info alert — check it out!`->React.string} </Alert>
9+
<Alert id="success" severity=Success> {`This is a success alert — check it out!`->React.string} </Alert>
1010
</div>
1111
}

examples/src/examples/ExampleAutocomplete.bs.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/src/examples/ExampleAutocomplete.res

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ let make = () => {
124124
renderInput={params => {
125125
let props = params->Mui.Autocomplete.renderInputParamsToTextFieldProps
126126
<Mui.TextField
127-
{...props} maxLength={20} label={React.string({"Combo box (uncontrolled)"})} variant=Outlined
127+
{...props} id="combo-box-demo-field" maxLength={20} label={React.string({"Combo box (uncontrolled)"})} variant=Outlined
128128
/>
129129
}}
130130
/>

examples/src/examples/ExampleButton.bs.js

+68
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
open Mui
2+
3+
@react.component
4+
let make = () => {
5+
<div>
6+
<Typography variant=H6> {"Button Examples:"->React.string} </Typography>
7+
<Box>
8+
<Button variant=Text id="button-text">
9+
{"Text"->React.string}
10+
</Button>
11+
<Button variant=Contained id="button-contained">
12+
{"Contained"->React.string}
13+
</Button>
14+
<Button variant=Outlined id="button-outlined">
15+
{"Outlined"->React.string}
16+
</Button>
17+
<Button variant=Contained color=Primary id="button-primary">
18+
{"Primary"->React.string}
19+
</Button>
20+
<Button variant=Contained color=Secondary id="button-secondary">
21+
{"Secondary"->React.string}
22+
</Button>
23+
<Button variant=Contained color=Success id="button-success">
24+
{"Success"->React.string}
25+
</Button>
26+
<Button variant=Contained color=Error disabled=true id="button-disabled">
27+
{"Disabled"->React.string}
28+
</Button>
29+
</Box>
30+
</div>
31+
}

examples/src/examples/ExampleButtonBase.bs.js

+52
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)