Compare commits

...

5 Commits

Author SHA1 Message Date
Robin
21ec08ffbd Merge pull request #378 from robintown/lint-shortcut
Add a shortcut lint script
2022-06-07 09:26:28 -04:00
Robin
1a7211198b Merge pull request #377 from robintown/spatial-audio-copy
Tweak spatial audio copy
2022-06-07 09:25:56 -04:00
Robin Townsend
2667e78b43 sound → seem 2022-06-06 11:26:48 -04:00
Robin Townsend
878b48aa7a Add a shortcut lint script 2022-06-06 11:21:51 -04:00
Robin Townsend
b314e047c1 Tweak spatial audio copy 2022-06-06 11:19:40 -04:00
4 changed files with 25 additions and 3 deletions

View File

@@ -8,6 +8,7 @@
"build-storybook": "build-storybook", "build-storybook": "build-storybook",
"prettier:check": "prettier -c src", "prettier:check": "prettier -c src",
"prettier:format": "prettier -w src", "prettier:format": "prettier -w src",
"lint": "yarn lint:types && yarn lint:js",
"lint:js": "eslint --max-warnings 0 src", "lint:js": "eslint --max-warnings 0 src",
"lint:types": "tsc" "lint:types": "tsc"
}, },

View File

@@ -39,7 +39,18 @@ export function Field({ children, className, ...rest }) {
export const InputField = forwardRef( export const InputField = forwardRef(
( (
{ id, label, className, type, checked, prefix, suffix, disabled, ...rest }, {
id,
label,
className,
type,
checked,
prefix,
suffix,
description,
disabled,
...rest
},
ref ref
) => { ) => {
return ( return (
@@ -82,6 +93,7 @@ export const InputField = forwardRef(
{label} {label}
</label> </label>
{suffix && <span>{suffix}</span>} {suffix && <span>{suffix}</span>}
{description && <p className={styles.description}>{description}</p>}
</Field> </Field>
); );
} }

View File

@@ -118,13 +118,15 @@
.checkboxField { .checkboxField {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
flex-wrap: wrap;
} }
.checkboxField label { .checkboxField label {
display: flex; display: flex;
align-items: center; align-items: center;
flex-grow: 1; flex-grow: 1;
font-size: 13px; font-size: 15px;
line-height: 24px;
} }
.checkboxField input { .checkboxField input {
@@ -176,3 +178,9 @@
color: var(--alert); color: var(--alert);
font-weight: 600; font-weight: 600;
} }
.description {
color: var(--secondary-content);
margin-left: 26px;
width: 100%; /* Ensure that it breaks onto the next row */
}

View File

@@ -87,9 +87,10 @@ export const SettingsModal = (props) => {
<FieldRow> <FieldRow>
<InputField <InputField
id="spatialAudio" id="spatialAudio"
label="Spatial audio (experimental)" label="Spatial audio"
type="checkbox" type="checkbox"
checked={spatialAudio} checked={spatialAudio}
description="This will make a speaker's audio seem as if it is coming from where their tile is positioned on screen. (Experimental feature: this may impact the stability of audio.)"
onChange={(e) => setSpatialAudio(e.target.checked)} onChange={(e) => setSpatialAudio(e.target.checked)}
/> />
</FieldRow> </FieldRow>