Skip to content

Commit

Permalink
Styling adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
johnuberbacher committed Sep 12, 2021
1 parent e161d36 commit 47e5911
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm start
### To-Do
- [x] Finish parsing data into Preview Modal

- [ ] Currency Picker/Exchange Rates
- [x] Currency Picker/Exchange Rates

- [ ] Calculate Tax based on currency

Expand Down
11 changes: 7 additions & 4 deletions src/components/EditableField.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ import InputGroup from 'react-bootstrap/InputGroup';
class EditableField extends React.Component {
render() {
return (
<InputGroup className="my-1">
<InputGroup className="my-1 flex-nowrap">
{this.props.cellData.leading != null &&
<InputGroup.Text
className="bg-light fw-bold border-0 text-secondary ps-3 pe-0"
className="bg-light fw-bold border-0 text-secondary px-2"
id="basic-addon1">
{this.props.cellData.leading}
<span className="border border-2 border-secondary rounded-circle d-flex align-items-center justify-content-center small" style={{width: '20px', height: '20px'}}>
{this.props.cellData.leading}
</span>
</InputGroup.Text>
}
<Form.Control className={this.props.cellData.textAlign}
<Form.Control
className={this.props.cellData.textAlign}
type={this.props.cellData.type}
placeholder={this.props.cellData.placeholder}
min={this.props.cellData.min}
Expand Down
12 changes: 6 additions & 6 deletions src/components/InvoiceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ class InvoiceForm extends React.Component {
<Col lg={6} >
<div className="d-flex flex-row align-items-start justify-content-between">
<span className="fw-bold">Subtotal: </span>
<span>{this.state.currency}0.00</span>
<span>{this.state.currency} 0.00</span>
</div>
<div className="d-flex flex-row align-items-start justify-content-between mt-2">
<span className="fw-bold">Discount: </span>
<span>{this.state.currency}0.00</span>
<span>{this.state.currency} 0.00</span>
</div>
<hr/>
<div className="d-flex flex-row align-items-start justify-content-between" style={{fontSize: '1.125rem'}}>
<span className="fw-bold">Total: </span>
<span className="fw-bold">{this.state.currency}0.00</span>
<span className="fw-bold">{this.state.currency} 0.00</span>
</div>
</Col>
</Row>
Expand All @@ -163,9 +163,9 @@ class InvoiceForm extends React.Component {
<option value="$">USD (United States Dollar)</option>
<option value="£">GBP (British Pound Sterling)</option>
<option value="¥">JPY (Japanese Yen)</option>
<option value="CAD$">CAD (Canadian Dollar)</option>
<option value="AUD$">AUD (Australian Dollar)</option>
<option value="SGD$">SGD (Signapore Dollar)</option>
<option value="$">CAD (Canadian Dollar)</option>
<option value="$">AUD (Australian Dollar)</option>
<option value="$">SGD (Signapore Dollar)</option>
<option value="¥">CNY (Chinese Renminbi)</option>
<option value="₿">BTC (Bitcoin)</option>
</Form.Select>
Expand Down
2 changes: 1 addition & 1 deletion src/components/InvoiceItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ItemizedTable extends React.Component {
<tr>
<th>ITEM</th>
<th>QTY</th>
<th>PRICE</th>
<th>PRICE/RATE</th>
<th className="text-center">ACTION</th>
</tr>
</thead>
Expand Down
10 changes: 5 additions & 5 deletions src/components/InvoiceModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class InvoiceModal extends React.Component {
</div>
<div className="text-end ms-4">
<h6 className="fw-bold mt-1 mb-2">Amount&nbsp;Due:</h6>
<h5 className="fw-bold text-secondary"> {this.props.currency}{this.props.info.total||'0.00'}</h5>
<h5 className="fw-bold text-secondary"> {this.props.currency} {this.props.info.total||'0.00'}</h5>
</div>
</div>
<div className="p-4">
Expand Down Expand Up @@ -89,8 +89,8 @@ class InvoiceModal extends React.Component {
<td>
{item.name} - {item.description}
</td>
<td style={{width: '100px'}}>{this.props.currency}{item.price}</td>
<td style={{width: '100px'}}>{this.props.currency}{item.price * item.quantity}</td>
<td style={{width: '100px'}}>{this.props.currency} {item.price}</td>
<td style={{width: '100px'}}>{this.props.currency} {item.price * item.quantity}</td>
</tr>
);
})}
Expand All @@ -106,12 +106,12 @@ class InvoiceModal extends React.Component {
<tr className="text-right">
<td></td>
<td className="fw-bold" style={{width: '100px'}}>TAX</td>
<td className="text-right" style={{width: '100px'}}>{this.props.currency}0.00</td>
<td className="text-right" style={{width: '100px'}}>{this.props.currency} 0.00</td>
</tr>
<tr>
<td></td>
<td className="fw-bold" style={{width: '100px'}}>TOTAL</td>
<td align="right" style={{width: '100px'}}>{this.props.currency}0.00</td>
<td align="right" style={{width: '100px'}}>{this.props.currency} 0.00</td>
</tr>
</tbody>
</Table>
Expand Down

0 comments on commit 47e5911

Please sign in to comment.