Skip to content

Commit

Permalink
Layout tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nurpax committed Feb 9, 2020
1 parent 7af772b commit 57d2a8a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/components/formHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ const RadioButton_ = ({label, onChange, checked, value}) => {
)
}

const NumberInput_ = ({label, onChange, value, defaultValue}) => {
const NumberInput_ = ({label, onChange, value, ...rest}) => {
return (
<label className={styles.numberInputContainer}>
{label}
<input
style={{minWidth: '4em'}}
type='number'
value={value}
size='5'
min='1'
max='10000'
onChange={onChange}
Expand Down
11 changes: 9 additions & 2 deletions src/components/formHelpers.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,22 @@
/*------------------------------------------*/

.numberInputContainer {

display: block;
position: relative;
margin-bottom: 12px;
font-size: 14px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.numberInputContainer input {
margin-left: 10px;
width: 40px;
background-color: #333;
color: rgb(170,170,170);
font-size: 0.8em;
font-size: 1.0em;
}

.numberInputContainer input[type=number]:focus {
Expand Down
2 changes: 1 addition & 1 deletion src/containers/ExportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class PNGExportForm extends Component<PNGExportFormatProps> {
<br/>
<Checkbox name='alphaPixel' label='Alpha pixel work-around for Twitter' />
<Checkbox name='borders' label='Include borders' />
<NumberInput name='scale' label='Scale' />
<NumberInput name='scale' label='Pixel scale' />
</Form>
)
}
Expand Down

0 comments on commit 57d2a8a

Please sign in to comment.