1
0
Fork 0
This commit is contained in:
ChaotiCryptidz 2022-06-02 16:35:51 +01:00
parent da8ebb5cc9
commit d65a0491a1
No known key found for this signature in database
2 changed files with 6 additions and 4 deletions

View file

@ -103,7 +103,7 @@ export class FoodTypeToggles extends Component<{
render(): JSX.Element { render(): JSX.Element {
return ( return (
<div> <div>
<h3 class="mt-5">Toggles</h3> <h3>Toggles</h3>
<div> <div>
<p>Broad Toggles</p> <p>Broad Toggles</p>
<ToggleableBox <ToggleableBox
@ -168,7 +168,7 @@ export class FoodTypeToggles extends Component<{
this.sendChangedEvent(); this.sendChangedEvent();
}} /> }} />
<button type="button mt-5" class="btn btn-danger" onClick={() => { <button type="button" class="btn btn-danger mt-2" onClick={() => {
this.setToDefaults(); this.setToDefaults();
this.sendChangedEvent(); this.sendChangedEvent();
}}>Reset</button> }}>Reset</button>

View file

@ -24,7 +24,6 @@ export class SettingsBlock extends Component {
onFontChange() { onFontChange() {
if (!this.fontSettingSelectRef.current) return; if (!this.fontSettingSelectRef.current) return;
let newFont = this.fontSettingSelectRef.current.value; let newFont = this.fontSettingSelectRef.current.value;
console.log(newFont);
for (let font of FONT_TYPES) { for (let font of FONT_TYPES) {
document.body.removeAttribute(`data-font-${font[1]}`) document.body.removeAttribute(`data-font-${font[1]}`)
@ -41,7 +40,6 @@ export class SettingsBlock extends Component {
<label for="fontSettingSelect">Font</label> <label for="fontSettingSelect">Font</label>
<select ref={this.fontSettingSelectRef} class="form-control" id="fontSettingSelect" onChange={() => this.onFontChange()}> <select ref={this.fontSettingSelectRef} class="form-control" id="fontSettingSelect" onChange={() => this.onFontChange()}>
{...FONT_TYPES.map((font: string[]) => { {...FONT_TYPES.map((font: string[]) => {
console.log(`FONT: ${font}`)
return <option value={font[0]}>{font[1]}</option>; return <option value={font[0]}>{font[1]}</option>;
})} })}
</select> </select>
@ -61,8 +59,12 @@ export class MainPage extends Component<unknown, { toggles: FoodExcludeTypes }>
<h1 class="mt-5">Chaos's Food Likes/Dislikes</h1> <h1 class="mt-5">Chaos's Food Likes/Dislikes</h1>
<p class="lead">a hopefully helpful guide on what food we like?</p> <p class="lead">a hopefully helpful guide on what food we like?</p>
<br />
<SettingsBlock /> <SettingsBlock />
<br />
<FoodTypeToggles onChange={(toggles) => { <FoodTypeToggles onChange={(toggles) => {
this.setState({ toggles }); this.setState({ toggles });
}} /> }} />