0

cleanup and styling , wip

This commit is contained in:
gingervitis 2020-12-29 14:47:31 -08:00 committed by Gabe Kangas
parent 78db81a8eb
commit f9b7a0d8e0
4 changed files with 23 additions and 15 deletions

View File

@ -14,15 +14,6 @@ save to local state/context.
read vals from there. read vals from there.
update vals to state, andthru api. update vals to state, andthru api.
TODO
- no on blur
- no onEnter
- if values chnage, then show "submit" button next to it
- on blur hide submit button. on submit success, hide button, blur out?
- esc key to reset + blur?
- if field clears, repop with orig value, if no orig vlaue, pop with default
*/ */
import React, { useState, useContext } from 'react'; import React, { useState, useContext } from 'react';

View File

@ -45,7 +45,7 @@ export default function PublicFacingDetails() {
<TextField fieldName="streamTitle" {...extraProps} /> <TextField fieldName="streamTitle" {...extraProps} />
</Form> </Form>
</div> </div>
<div className="misc-optionals"> <div className="misc-fields">
add social handles comp add social handles comp
<br/> <br/>
add tags comp add tags comp

View File

@ -1,16 +1,33 @@
.ant-btn-primary:hover, .ant-btn-primary:focus {
background-color: white;
color: #40a9ff;
}
.ant-btn-primary:focus {
box-shadow: 0px 1px 3px 2px rgba(90,103,216, .25)
}
.ant-input-affix-wrapper,
.ant-btn {
transition-delay: 0s;
transition-duration: 0.15s;
}
.config-public-details-container { .config-public-details-container {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
flex-wrap: wrap;
.text-fields { .text-fields {
margin-right: 1rem; margin-right: 2rem;
}
.misc-fields {
border: 1px solid var(--owncast-purple);
padding: 2em;
} }
} }
.textfield-container { .textfield-container {
// width: 28rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;

View File

@ -1,9 +1,9 @@
// TS types for elements on the Config pages // TS types for elements on the Config pages
export interface TextFieldProps { export interface TextFieldProps {
onUpdate: ({ fieldName, value }: UpdateArgs) => void; handleResetValue: ({ fieldName }) => void;
fieldName: string; fieldName: string;
initialValue: string; initialValues: any;
type: string; type: string;
} }