mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 05:09:05 +00:00
Styled buttons
This commit is contained in:
@@ -153,13 +153,16 @@ export function Dashboard(props) {
|
||||
<AudioVisualizer isRecording={props.isRecording} />
|
||||
|
||||
<button
|
||||
className="mx-auto mt-6 mb-9"
|
||||
onClick={() => props.onRecord(!props.isRecording)}
|
||||
className={`px-4 py-2 mb-4 text-2xl font-bold rounded ${
|
||||
props.isRecording ? "bg-red-500" : "bg-blue-500"
|
||||
}`}
|
||||
data-color={props.isRecording ? "red" : "blue"}
|
||||
>
|
||||
{props.isRecording ? "STOP" : "RESUME"}
|
||||
</button>
|
||||
|
||||
<footer className="w-full bg-gray-800 text-center py-4 mt-4 text-white">
|
||||
Reflector © 2023 Monadical
|
||||
</footer>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -25,17 +25,11 @@ export default function Record(props) {
|
||||
|
||||
<div className="flex flex-col items-center justify-center flex-grow -mt-10">
|
||||
{!props.isRecording ? (
|
||||
<button
|
||||
onClick={startRecording}
|
||||
className="px-4 py-2 mb-4 text-2xl font-bold text-white bg-blue-500 rounded"
|
||||
>
|
||||
<button onClick={startRecording} data-color="blue">
|
||||
Record
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
onClick={stopRecording}
|
||||
className="px-4 py-2 mb-4 text-2xl font-bold text-red-500 rounded"
|
||||
>
|
||||
<button onClick={stopRecording} data-color="red">
|
||||
Stop
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -3,6 +3,7 @@ import React, { useState, useEffect } from "react";
|
||||
import Record from "./components/record.js";
|
||||
import { Dashboard } from "./components/dashboard.js";
|
||||
import useWebRTC from "./components/webrtc.js";
|
||||
import "../public/button.css";
|
||||
|
||||
const App = () => {
|
||||
const [isRecording, setIsRecording] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user