Skip to content

Commit

Permalink
[material-ui][Switch] Convert to support CSS extraction (#41367)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Mar 6, 2024
1 parent b03ada2 commit 1249a37
Show file tree
Hide file tree
Showing 4 changed files with 1,938 additions and 4,759 deletions.
65 changes: 65 additions & 0 deletions apps/pigment-next-app/src/app/material-ui/react-switch/page.tsx
@@ -0,0 +1,65 @@
'use client';
import * as React from 'react';
import BasicSwitches from '../../../../../../docs/data/material/components/switches/BasicSwitches';
import ColorSwitches from '../../../../../../docs/data/material/components/switches/ColorSwitches';
import ControlledSwitches from '../../../../../../docs/data/material/components/switches/ControlledSwitches';
import CustomizedSwitches from '../../../../../../docs/data/material/components/switches/CustomizedSwitches';
import FormControlLabelPosition from '../../../../../../docs/data/material/components/switches/FormControlLabelPosition';
import SwitchLabels from '../../../../../../docs/data/material/components/switches/SwitchLabels';
import SwitchesGroup from '../../../../../../docs/data/material/components/switches/SwitchesGroup';
import SwitchesSize from '../../../../../../docs/data/material/components/switches/SwitchesSize';

export default function Switches() {
return (
<React.Fragment>
<section>
<h2> Basic Switches</h2>
<div className="demo-container">
<BasicSwitches />
</div>
</section>
<section>
<h2> Color Switches</h2>
<div className="demo-container">
<ColorSwitches />
</div>
</section>
<section>
<h2> Controlled Switches</h2>
<div className="demo-container">
<ControlledSwitches />
</div>
</section>
<section>
<h2> Customized Switches</h2>
<div className="demo-container">
<CustomizedSwitches />
</div>
</section>
<section>
<h2> Form Control Label Position</h2>
<div className="demo-container">
<FormControlLabelPosition />
</div>
</section>
<section>
<h2> Switch Labels</h2>
<div className="demo-container">
<SwitchLabels />
</div>
</section>
<section>
<h2> Switches Group</h2>
<div className="demo-container">
<SwitchesGroup />
</div>
</section>
<section>
<h2> Switches Size</h2>
<div className="demo-container">
<SwitchesSize />
</div>
</section>
</React.Fragment>
);
}
66 changes: 66 additions & 0 deletions apps/pigment-vite-app/src/pages/material-ui/react-switch.tsx
@@ -0,0 +1,66 @@
import * as React from 'react';
import MaterialUILayout from '../../Layout';
import BasicSwitches from '../../../../../docs/data/material/components/switches/BasicSwitches.tsx';
import ColorSwitches from '../../../../../docs/data/material/components/switches/ColorSwitches.tsx';
import ControlledSwitches from '../../../../../docs/data/material/components/switches/ControlledSwitches.tsx';
import CustomizedSwitches from '../../../../../docs/data/material/components/switches/CustomizedSwitches.tsx';
import FormControlLabelPosition from '../../../../../docs/data/material/components/switches/FormControlLabelPosition.tsx';
import SwitchLabels from '../../../../../docs/data/material/components/switches/SwitchLabels.tsx';
import SwitchesGroup from '../../../../../docs/data/material/components/switches/SwitchesGroup.tsx';
import SwitchesSize from '../../../../../docs/data/material/components/switches/SwitchesSize.tsx';

export default function Switches() {
return (
<MaterialUILayout>
<h1>Switches</h1>
<section>
<h2> Basic Switches</h2>
<div className="demo-container">
<BasicSwitches />
</div>
</section>
<section>
<h2> Color Switches</h2>
<div className="demo-container">
<ColorSwitches />
</div>
</section>
<section>
<h2> Controlled Switches</h2>
<div className="demo-container">
<ControlledSwitches />
</div>
</section>
<section>
<h2> Customized Switches</h2>
<div className="demo-container">
<CustomizedSwitches />
</div>
</section>
<section>
<h2> Form Control Label Position</h2>
<div className="demo-container">
<FormControlLabelPosition />
</div>
</section>
<section>
<h2> Switch Labels</h2>
<div className="demo-container">
<SwitchLabels />
</div>
</section>
<section>
<h2> Switches Group</h2>
<div className="demo-container">
<SwitchesGroup />
</div>
</section>
<section>
<h2> Switches Size</h2>
<div className="demo-container">
<SwitchesSize />
</div>
</section>
</MaterialUILayout>
);
}

0 comments on commit 1249a37

Please sign in to comment.