Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Open
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
13 changes: 11 additions & 2 deletions src/components/Settings.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import PropTypes from "prop-types";
import { ToggleSwitch, Text } from "@deriv-com/quill-ui";
import { ToggleSwitch, Text, SectionMessage } from "@deriv-com/quill-ui";

const Settings = ({ settings, updateSettings, onChangeSettings }) => {
const [allowCopiers, setAllowCopiers] = useState(
Expand Down Expand Up @@ -29,7 +29,8 @@ const Settings = ({ settings, updateSettings, onChangeSettings }) => {
Trader Mode
</Text>
<Text size="sm" color="secondary">
Enable this to allow others to copy your trades
Enable this to allow others to copy your trades.
Disable this to become a copy.
</Text>
</div>
<ToggleSwitch
Expand All @@ -38,6 +39,14 @@ const Settings = ({ settings, updateSettings, onChangeSettings }) => {
size="lg"
/>
</div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider connecting the warning message to the toggle switch using aria-describedby

This would improve accessibility by explicitly associating the warning message with the toggle control.

Suggested implementation:

                    <ToggleSwitch
                        size="lg"
                        aria-describedby="copiers-warning"
                    <SectionMessage
                        id="copiers-warning"
                        message="Upon disabling, all your active copiers will be dropped without any notification."
                        size="sm"
                        status="danger"
                        title="Caution"

<div className="mt-4">
<SectionMessage
message="Upon disabling, others won't be able to copy you and all your active copiers will be dropped without any notification."
size="sm"
status="warning"
title="Caution"
/>
</div>
</div>
</div>
);
Expand Down