mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
use my button component for removing
This commit is contained in:
@@ -2,7 +2,7 @@ header h1 {
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
button {
|
||||
.p-button {
|
||||
margin-top: 12px;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
|
||||
@@ -25,8 +25,8 @@ class App extends Component {
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<Button onClick={this._onGenerate.bind(this)} text="Backe PDF"/>
|
||||
<Button onClick={this._onClear.bind(this)} text="Alles Löschen"/>
|
||||
<Button onClick={this._onGenerate.bind(this)}>Backe PDF</Button>
|
||||
<Button onClick={this._onClear.bind(this)}>Alles Löschen</Button>
|
||||
</div>
|
||||
<Preview
|
||||
pdfUrl={state.pdfUrl}
|
||||
|
||||
@@ -2,6 +2,6 @@ import React from 'react';
|
||||
|
||||
export default function(props) {
|
||||
return (
|
||||
<button onClick={props.onClick}>{props.text}</button>
|
||||
<button className="p-button" onClick={props.onClick}>{props.children}</button>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import Button from './Button';
|
||||
|
||||
export default function(props) {
|
||||
const latest = props.latest || [];
|
||||
@@ -6,9 +7,9 @@ export default function(props) {
|
||||
const created = new Date(item.created);
|
||||
return (
|
||||
<li key={item.id}>
|
||||
<a href="#" onClick={() => props.onSelect(item)}>{created.toLocaleString()}</a>
|
||||
<a href="#item-{item.id}" onClick={() => props.onSelect(item)}>{created.toLocaleString()}</a>
|
||||
<span> </span>
|
||||
<a href="#" onClick={() => props.onRemove(item)}><small>(Remove)</small></a>
|
||||
<Button onClick={() => props.onRemove(item)}>Remove</Button>
|
||||
</li>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user