1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 07:27:39 +02:00

forum: add components/LogInButtons

This commit is contained in:
David Sevilla Martin
2020-01-25 10:24:15 -05:00
parent 1f1986c527
commit 557bb086f9
2 changed files with 25 additions and 9 deletions

View 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();
}
}

View File

@@ -1,24 +1,20 @@
import Stream from 'mithril/stream';
import Modal from '../../common/components/Modal';
import {ComponentProps} from '../../common/Component';
import Modal from '../../common/components/Modal';
import ItemList from "../../common/utils/ItemList";
import Button from "../../common/components/Button";
import LogInButtons from './LogInButtons';
export interface LogInModalProps extends ComponentProps {
username?: string;
identification?: string;
password?: string;
remember?: boolean;
}
/**
* The `LogInModal` component displays a modal dialog with a login form.
*
* ### Props
*
* - `identification`
* - `password`
* - `remember`
*/
export default class LogInModal extends Modal<LogInModalProps> {
/**
@@ -67,7 +63,7 @@ export default class LogInModal extends Modal<LogInModalProps> {
body() {
return [
// <LogInButtons/>,
<LogInButtons/>,
<div className="Form Form--centered">
{this.fields().toArray()}