Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Switch] Convert to support CSS extraction #41367

Merged
merged 4 commits into from Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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>
);
}