mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-25 09:46:47 +00:00
✨(sdk) add sdk projects
It includes a consumer project which is simply a demo app. The sdk project includes the first version of the SDK, with a light React implementation. The first version lays down the foundations of the iframe sdk framework. The npm package logic is also already ready to be published.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#root {
|
||||
margin: 0 auto;
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { VisioCreateButton } from "@gouvfr-lasuite/visio-sdk";
|
||||
import "./App.css";
|
||||
import { useState } from "react";
|
||||
|
||||
function App() {
|
||||
const [roomUrl, setRoomUrl] = useState("");
|
||||
|
||||
return (
|
||||
<form className="form">
|
||||
<div className="header">
|
||||
<h2>Create event</h2>
|
||||
<span>Visio demo app</span>
|
||||
</div>
|
||||
<div className="group">
|
||||
<label>Subject</label>
|
||||
<input type="text" />
|
||||
</div>
|
||||
<div className="group">
|
||||
<label>Place</label>
|
||||
<input type="text" />
|
||||
</div>
|
||||
<div className="group">
|
||||
<label>Visioconference</label>
|
||||
<VisioCreateButton onRoomCreated={setRoomUrl} />
|
||||
</div>
|
||||
<div className="group">
|
||||
<label>Description</label>
|
||||
<textarea />
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
alert("Room url: " + roomUrl);
|
||||
}}
|
||||
>
|
||||
Create
|
||||
</button>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,74 @@
|
||||
* {
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
||||
"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
|
||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
box-sizing: border-box;
|
||||
color: rgb(9, 9, 11);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: oklch(0.985 0 0);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding-top: 2rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 14px;
|
||||
color: oklch(0.372 0.044 257.287);
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 500px;
|
||||
gap: 1rem;
|
||||
border: 1px solid #e5e7eb;
|
||||
background-color: white;
|
||||
border-radius: 1rem;
|
||||
padding: 3rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
label {
|
||||
color: rgb(9, 9, 11);
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
input,
|
||||
textarea {
|
||||
border: 1px rgb(228, 228, 231) solid;
|
||||
border-radius: 6px;
|
||||
height: 36px;
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
textarea {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: rgb(45, 45, 70);
|
||||
color: white;
|
||||
height: 46px;
|
||||
border-radius: 4px;
|
||||
font-size: 16px;
|
||||
font-weight: 300;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import './index.css'
|
||||
import App from './App.tsx'
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
)
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user