Skip to content

Commit

Permalink
add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova committed Sep 3, 2024
1 parent 064907e commit 640e4af
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/regressions/fixtures/Radio/RadioDisabledState.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import * as React from 'react';
import Radio from '@mui/material/Radio';

export default function RadioButtonsDisabled() {
const [selectedValue, setSelectedValue] = React.useState('a');

const handleChange = (event) => {
setSelectedValue(event.target.value);
};

return (
<div>
<Radio
disabled
checked={selectedValue === 'a'}
onChange={handleChange}
value="a"
name="radio-buttons"
inputProps={{ 'aria-label': 'A' }}
/>
<Radio
disabled
checked={selectedValue === 'b'}
onChange={handleChange}
value="b"
name="radio-buttons"
inputProps={{ 'aria-label': 'B' }}
/>
</div>
);
}

0 comments on commit 640e4af

Please sign in to comment.