mirror of
https://github.com/flarum/core.git
synced 2025-08-04 15:37:51 +02:00
forum: add components/LogInButtons
This commit is contained in:
20
js/src/forum/components/LogInButtons.tsx
Normal file
20
js/src/forum/components/LogInButtons.tsx
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import Component from '../../common/Component';
|
||||||
|
import ItemList from '../../common/utils/ItemList';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The `LogInButtons` component displays a collection of social login buttons.
|
||||||
|
*/
|
||||||
|
export default class LogInButtons extends Component {
|
||||||
|
view() {
|
||||||
|
return <div className="LogInButtons">
|
||||||
|
{this.items().toArray()}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build a list of LogInButton components.
|
||||||
|
*/
|
||||||
|
items(): ItemList {
|
||||||
|
return new ItemList();
|
||||||
|
}
|
||||||
|
}
|
@@ -1,24 +1,20 @@
|
|||||||
import Stream from 'mithril/stream';
|
import Stream from 'mithril/stream';
|
||||||
|
|
||||||
import Modal from '../../common/components/Modal';
|
|
||||||
import {ComponentProps} from '../../common/Component';
|
import {ComponentProps} from '../../common/Component';
|
||||||
|
import Modal from '../../common/components/Modal';
|
||||||
import ItemList from "../../common/utils/ItemList";
|
import ItemList from "../../common/utils/ItemList";
|
||||||
import Button from "../../common/components/Button";
|
import Button from "../../common/components/Button";
|
||||||
|
|
||||||
|
import LogInButtons from './LogInButtons';
|
||||||
|
|
||||||
export interface LogInModalProps extends ComponentProps {
|
export interface LogInModalProps extends ComponentProps {
|
||||||
username?: string;
|
identification?: string;
|
||||||
password?: string;
|
password?: string;
|
||||||
remember?: boolean;
|
remember?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The `LogInModal` component displays a modal dialog with a login form.
|
* The `LogInModal` component displays a modal dialog with a login form.
|
||||||
*
|
|
||||||
* ### Props
|
|
||||||
*
|
|
||||||
* - `identification`
|
|
||||||
* - `password`
|
|
||||||
* - `remember`
|
|
||||||
*/
|
*/
|
||||||
export default class LogInModal extends Modal<LogInModalProps> {
|
export default class LogInModal extends Modal<LogInModalProps> {
|
||||||
/**
|
/**
|
||||||
@@ -67,7 +63,7 @@ export default class LogInModal extends Modal<LogInModalProps> {
|
|||||||
|
|
||||||
body() {
|
body() {
|
||||||
return [
|
return [
|
||||||
// <LogInButtons/>,
|
<LogInButtons/>,
|
||||||
|
|
||||||
<div className="Form Form--centered">
|
<div className="Form Form--centered">
|
||||||
{this.fields().toArray()}
|
{this.fields().toArray()}
|
||||||
|
Reference in New Issue
Block a user