made button not daisy
This commit is contained in:
parent
beeca57d4e
commit
79daf10988
|
@ -10,6 +10,7 @@ import { MAX_POST_TITLE_LENGTH } from 'common/post'
|
||||||
import { postPath } from 'web/lib/firebase/posts'
|
import { postPath } from 'web/lib/firebase/posts'
|
||||||
import { Group } from 'common/group'
|
import { Group } from 'common/group'
|
||||||
import { ExpandingInput } from './expanding-input'
|
import { ExpandingInput } from './expanding-input'
|
||||||
|
import { Button } from './button'
|
||||||
|
|
||||||
export function CreatePost(props: { group?: Group }) {
|
export function CreatePost(props: { group?: Group }) {
|
||||||
const [title, setTitle] = useState('')
|
const [title, setTitle] = useState('')
|
||||||
|
@ -91,12 +92,10 @@ export function CreatePost(props: { group?: Group }) {
|
||||||
<TextEditor editor={editor} upload={upload} />
|
<TextEditor editor={editor} upload={upload} />
|
||||||
<Spacer h={6} />
|
<Spacer h={6} />
|
||||||
|
|
||||||
<button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
className={clsx(
|
loading={isSubmitting}
|
||||||
'btn btn-primary normal-case',
|
size="xl"
|
||||||
isSubmitting && 'loading disabled'
|
|
||||||
)}
|
|
||||||
disabled={isSubmitting || !isValid || upload.isLoading}
|
disabled={isSubmitting || !isValid || upload.isLoading}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
setIsSubmitting(true)
|
setIsSubmitting(true)
|
||||||
|
@ -105,7 +104,7 @@ export function CreatePost(props: { group?: Group }) {
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isSubmitting ? 'Creating...' : 'Create a post'}
|
{isSubmitting ? 'Creating...' : 'Create a post'}
|
||||||
</button>
|
</Button>
|
||||||
{error !== '' && <div className="text-red-700">{error}</div>}
|
{error !== '' && <div className="text-red-700">{error}</div>}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user