Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import html from '!!raw-loader!./sample.html';
import js from '!!raw-loader!./main.js';
import react from '!!raw-loader!./sample.tsx';

<Editor html={html} js={js} react={react} />
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "@ui5/webcomponents/dist/Switch.js";
20 changes: 20 additions & 0 deletions packages/website/docs/_samples/main/Switch/ReadOnly/sample.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- playground-fold -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sample</title>
</head>
<body style="background-color: var(--sapBackgroundColor);">
<!-- playground-fold-end -->

<ui5-switch readonly></ui5-switch>
<ui5-switch readonly checked></ui5-switch>
<ui5-switch readonly design="Textual" text-on="On" text-off="Off"></ui5-switch>
<ui5-switch readonly checked design="Textual" text-on="On" text-off="Off"></ui5-switch>
<!-- playground-fold -->
<script type="module" src="main.js"></script>
</body>
</html>
<!-- playground-fold-end -->
18 changes: 18 additions & 0 deletions packages/website/docs/_samples/main/Switch/ReadOnly/sample.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import createReactComponent from "@ui5/webcomponents-base/dist/createReactComponent.js";
import SwitchClass from "@ui5/webcomponents/dist/Switch.js";

const Switch = createReactComponent(SwitchClass);

function App() {
return (
<>
<Switch readonly={true} />
<Switch readonly={true} checked={true} />
<Switch readonly={true} design="Textual" textOn="On" textOff="Off" />
<Switch readonly={true} checked={true} design="Textual" textOn="On" textOff="Off" />

</>
);
}

export default App;
Loading