cleanup css

This commit is contained in:
Sean Yesmunt 2018-05-11 13:47:05 -04:00
parent 7635145641
commit f231b430e6
4 changed files with 15 additions and 10 deletions

View file

@ -9,6 +9,7 @@ type Props = {
padded?: boolean,
verticallyCentered?: boolean,
stretch?: boolean,
alignRight?: boolean,
};
export class FormRow extends React.PureComponent<Props> {
@ -17,7 +18,7 @@ export class FormRow extends React.PureComponent<Props> {
};
render() {
const { centered, children, padded, verticallyCentered, stretch } = this.props;
const { centered, children, padded, verticallyCentered, stretch, alignRight } = this.props;
return (
<div
className={classnames('form-row', {
@ -25,6 +26,7 @@ export class FormRow extends React.PureComponent<Props> {
'form-row--padded': padded,
'form-row--vertically-centered': verticallyCentered,
'form-row--stretch': stretch,
'form-row--right': alignRight,
})}
>
{children}

View file

@ -7,7 +7,7 @@ import FilePrice from 'component/filePrice';
import FileDetails from 'component/fileDetails';
import FileActions from 'component/fileActions';
import UriIndicator from 'component/uriIndicator';
import { FormField } from 'component/common/form';
import { FormField, FormRow } from 'component/common/form';
import Icon from 'component/common/icon';
import DateTime from 'component/dateTime';
import * as icons from 'constants/icons';
@ -48,7 +48,9 @@ type Props = {
fetchFileInfo: string => void,
fetchCostInfo: string => void,
prepareEdit: ({}) => void,
setClientSetting: (string, boolean | string | Price) => void,
setClientSetting: (string, boolean | string) => void,
checkSubscription: ({ channelName: string, uri: string }) => void,
subscriptions: Array<{}>,
};
class FilePage extends React.Component<Props> {
@ -85,6 +87,7 @@ class FilePage extends React.Component<Props> {
checkSubscription = (props: Props) => {
if (
props.claim.value.publisherSignature &&
props.subscriptions
.map(subscription => subscription.channelName)
.indexOf(props.claim.channel_name) !== -1
@ -192,7 +195,7 @@ class FilePage extends React.Component<Props> {
)}
</div>
</div>
<div className="autoplay">
<FormRow alignRight>
<FormField
type="checkbox"
name="autoplay"
@ -200,7 +203,7 @@ class FilePage extends React.Component<Props> {
checked={autoplay}
postfix={__('Autoplay')}
/>
</div>
</FormRow>
</div>
<div className="card__content">

View file

@ -173,11 +173,7 @@
.card__channel-info--large {
padding-top: 0;
padding-bottom: 0;
}
.autoplay div div input {
margin: 0 0 $spacing-vertical auto;
padding-bottom: $spacing-vertical * 2/3;
}
.card__content {

View file

@ -23,6 +23,10 @@
flex: 1;
}
&.form-row--right {
justify-content: flex-end;
}
.form-field.form-field--stretch {
width: 100%;