From f701f45b41061e585fa0e122237b7f91bb6b1429 Mon Sep 17 00:00:00 2001 From: Marc Taylor Date: Tue, 17 Sep 2024 08:27:22 +0200 Subject: [PATCH 1/4] Added documentations for indeterminateIcon prop. --- .../material/components/checkboxes/IndeterminateCheckbox.js | 2 ++ .../material/components/checkboxes/IndeterminateCheckbox.tsx | 3 +++ .../components/checkboxes/IndeterminateCheckbox.tsx.preview | 1 + docs/data/material/components/checkboxes/checkboxes.md | 1 + 4 files changed, 7 insertions(+) diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.js b/docs/data/material/components/checkboxes/IndeterminateCheckbox.js index 3ada61d101d47f..cd18026257256e 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.js +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.js @@ -2,6 +2,7 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; +import IndeterminateCheckBox from '@mui/icons-material/IndeterminateCheckBox'; export default function IndeterminateCheckbox() { const [checked, setChecked] = React.useState([true, false]); @@ -40,6 +41,7 @@ export default function IndeterminateCheckbox() { checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} + indeterminateIcon={} /> } /> diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx index b431061da69969..a99311ac4b3aba 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx @@ -2,6 +2,8 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; +import IndeterminateCheckBox from '@mui/icons-material/IndeterminateCheckBox'; + export default function IndeterminateCheckbox() { const [checked, setChecked] = React.useState([true, false]); @@ -40,6 +42,7 @@ export default function IndeterminateCheckbox() { checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} + indeterminateIcon={} /> } /> diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview index 7f0397629cc7bb..ab9797212988d7 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview @@ -5,6 +5,7 @@ checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} + indeterminateIcon={} /> } /> diff --git a/docs/data/material/components/checkboxes/checkboxes.md b/docs/data/material/components/checkboxes/checkboxes.md index d0b1839573805b..31883a5485410d 100644 --- a/docs/data/material/components/checkboxes/checkboxes.md +++ b/docs/data/material/components/checkboxes/checkboxes.md @@ -55,6 +55,7 @@ You can control the checkbox with the `checked` and `onChange` props: A checkbox input can only have two states in a form: checked or unchecked. It either submits its value or doesn't. Visually, there are **three** states a checkbox can be in: checked, unchecked, or indeterminate. +To design the indeterminate icon you can use the `indeterminateIcon` prop. {{"demo": "IndeterminateCheckbox.js"}} From 4247ae528480009b36d002235f5b934c891d10e0 Mon Sep 17 00:00:00 2001 From: Marc Taylor Date: Mon, 30 Sep 2024 18:58:43 +0200 Subject: [PATCH 2/4] pnpm prettier --- .../material/components/checkboxes/IndeterminateCheckbox.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx index a99311ac4b3aba..40fb8a89343650 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx @@ -4,7 +4,6 @@ import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; import IndeterminateCheckBox from '@mui/icons-material/IndeterminateCheckBox'; - export default function IndeterminateCheckbox() { const [checked, setChecked] = React.useState([true, false]); From 43475b18be3603a1556dcde468bbd2f0ec0eb851 Mon Sep 17 00:00:00 2001 From: Marc Taylor <71985698+marctaylor01@users.noreply.github.com> Date: Fri, 4 Oct 2024 15:25:41 +0200 Subject: [PATCH 3/4] Update docs/data/material/components/checkboxes/checkboxes.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Aarón García Hervás Signed-off-by: Marc Taylor <71985698+marctaylor01@users.noreply.github.com> --- docs/data/material/components/checkboxes/checkboxes.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/data/material/components/checkboxes/checkboxes.md b/docs/data/material/components/checkboxes/checkboxes.md index 31883a5485410d..770a0b95287c8e 100644 --- a/docs/data/material/components/checkboxes/checkboxes.md +++ b/docs/data/material/components/checkboxes/checkboxes.md @@ -55,7 +55,8 @@ You can control the checkbox with the `checked` and `onChange` props: A checkbox input can only have two states in a form: checked or unchecked. It either submits its value or doesn't. Visually, there are **three** states a checkbox can be in: checked, unchecked, or indeterminate. -To design the indeterminate icon you can use the `indeterminateIcon` prop. + +You can change the indeterminate icon using the `indeterminateIcon` prop. {{"demo": "IndeterminateCheckbox.js"}} From 4396a5349a898da6aac344e8de8d541daa08ca6c Mon Sep 17 00:00:00 2001 From: Marc Taylor Date: Fri, 4 Oct 2024 15:51:58 +0200 Subject: [PATCH 4/4] removed usage of indeterminateIcon prop in code demos --- .../material/components/checkboxes/IndeterminateCheckbox.js | 2 -- .../material/components/checkboxes/IndeterminateCheckbox.tsx | 2 -- .../components/checkboxes/IndeterminateCheckbox.tsx.preview | 1 - 3 files changed, 5 deletions(-) diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.js b/docs/data/material/components/checkboxes/IndeterminateCheckbox.js index cd18026257256e..3ada61d101d47f 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.js +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.js @@ -2,7 +2,6 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; -import IndeterminateCheckBox from '@mui/icons-material/IndeterminateCheckBox'; export default function IndeterminateCheckbox() { const [checked, setChecked] = React.useState([true, false]); @@ -41,7 +40,6 @@ export default function IndeterminateCheckbox() { checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} - indeterminateIcon={} /> } /> diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx index 40fb8a89343650..b431061da69969 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx @@ -2,7 +2,6 @@ import * as React from 'react'; import Box from '@mui/material/Box'; import Checkbox from '@mui/material/Checkbox'; import FormControlLabel from '@mui/material/FormControlLabel'; -import IndeterminateCheckBox from '@mui/icons-material/IndeterminateCheckBox'; export default function IndeterminateCheckbox() { const [checked, setChecked] = React.useState([true, false]); @@ -41,7 +40,6 @@ export default function IndeterminateCheckbox() { checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} - indeterminateIcon={} /> } /> diff --git a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview index ab9797212988d7..7f0397629cc7bb 100644 --- a/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview +++ b/docs/data/material/components/checkboxes/IndeterminateCheckbox.tsx.preview @@ -5,7 +5,6 @@ checked={checked[0] && checked[1]} indeterminate={checked[0] !== checked[1]} onChange={handleChange1} - indeterminateIcon={} /> } />