stacker.news/components/adv-post-form.js

30 lines
788 B
JavaScript
Raw Normal View History

2021-09-11 21:52:19 +00:00
import AccordianItem from './accordian-item'
import * as Yup from 'yup'
import { Input } from './form'
import { InputGroup } from 'react-bootstrap'
export const AdvPostSchema = {
boost: Yup.number().typeError('must be a number')
.min(0, 'must be positive').integer('must be whole')
}
export const AdvPostInitial = {
boost: 0
}
export default function AdvPostForm () {
return (
<AccordianItem
2021-09-12 16:55:38 +00:00
header={<div style={{ fontWeight: 'bold', fontSize: '92%' }}>options</div>}
2021-09-11 21:52:19 +00:00
body={
<Input
label='boost'
name='boost'
2021-09-15 22:57:55 +00:00
hint={<span className='text-muted'>ranks posts higher temporarily based on the amount</span>}
2021-09-11 21:52:19 +00:00
append={<InputGroup.Text className='text-monospace'>sats</InputGroup.Text>}
/>
}
/>
)
}