mirror of
https://git.netzspielplatz.de/docker-multiarch/openwrt-firmware-selector.git
synced 2025-11-08 23:39:37 +00:00
Add prettier support
Add prettier and bind it with eslint. Also add pre-commit hook to prettify before commit Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
This commit is contained in:
parent
3f46d13ccf
commit
ce4d2e1436
13 changed files with 776 additions and 468 deletions
|
|
@ -9,7 +9,15 @@ import {
|
|||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function AlertDialog({open, cancelHandler, acceptHandler, body, title, cancelComponent, acceptComponent}) {
|
||||
function AlertDialog({
|
||||
open,
|
||||
cancelHandler,
|
||||
acceptHandler,
|
||||
body,
|
||||
title,
|
||||
cancelComponent,
|
||||
acceptComponent,
|
||||
}) {
|
||||
return (
|
||||
<Dialog
|
||||
open={open}
|
||||
|
|
@ -17,28 +25,28 @@ function AlertDialog({open, cancelHandler, acceptHandler, body, title, cancelCom
|
|||
aria-labelledby="alert-dialog-title"
|
||||
aria-describedby="alert-dialog-description"
|
||||
>
|
||||
<DialogTitle
|
||||
id="alert-dialog-title">{title}</DialogTitle>
|
||||
<DialogTitle id="alert-dialog-title">{title}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText id="alert-dialog-description">
|
||||
{body}
|
||||
</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
{
|
||||
acceptHandler && (
|
||||
<Button onClick={acceptHandler} color="primary">
|
||||
{acceptComponent}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{
|
||||
cancelHandler && (
|
||||
<Button onClick={cancelHandler} color="secondary" variant="contained" autoFocus>
|
||||
{cancelComponent}
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
{acceptHandler && (
|
||||
<Button onClick={acceptHandler} color="primary">
|
||||
{acceptComponent}
|
||||
</Button>
|
||||
)}
|
||||
{cancelHandler && (
|
||||
<Button
|
||||
onClick={cancelHandler}
|
||||
color="secondary"
|
||||
variant="contained"
|
||||
autoFocus
|
||||
>
|
||||
{cancelComponent}
|
||||
</Button>
|
||||
)}
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue