✨(demo) add app demo
This demo is useful to test in the real usage of the design system as a real user that will generate its own customized design tokens, implements the design system's components, etc ...
This commit is contained in:
6
apps/demo/src/cunningham-tokens.css
Normal file
6
apps/demo/src/cunningham-tokens.css
Normal file
@@ -0,0 +1,6 @@
|
||||
:root {
|
||||
--c--colors--primary: purple;
|
||||
--c--colors--secondary: #DA0000;
|
||||
--c--text--primary: purple;
|
||||
--c--text--secondary: #DA0000;
|
||||
}
|
||||
27
apps/demo/src/index.scss
Normal file
27
apps/demo/src/index.scss
Normal file
@@ -0,0 +1,27 @@
|
||||
@import "cunningham-tokens";
|
||||
@import "@openfun/cunningham-react/style";
|
||||
|
||||
:root {
|
||||
font-family: Roboto, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
font-weight: 400;
|
||||
color: var(--c--colors--primary);
|
||||
background-color: #242424;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
h1 {
|
||||
color: white;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
}
|
||||
13
apps/demo/src/main.tsx
Normal file
13
apps/demo/src/main.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import "./index.scss";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
|
||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<div className="center">
|
||||
<h1 className="test">Cunningham Demo.</h1>
|
||||
<Button />
|
||||
</div>
|
||||
</React.StrictMode>
|
||||
);
|
||||
1
apps/demo/src/vite-env.d.ts
vendored
Normal file
1
apps/demo/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
Reference in New Issue
Block a user