mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 23:00:34 +00:00
feat: add lock all transactions at once callout.
This commit is contained in:
@@ -1,17 +1,60 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
|
import styled from 'styled-components';
|
||||||
|
|
||||||
import Style from './style.module.scss';
|
export function Alert({ title, description, children, intent, className }) {
|
||||||
|
|
||||||
export function Alert({ title, description, intent }) {
|
|
||||||
return (
|
return (
|
||||||
<div
|
<AlertRoot className={clsx(className)} intent={intent}>
|
||||||
className={clsx(Style.root, {
|
{title && <AlertTitle>{title}</AlertTitle>}
|
||||||
[`${Style['root_' + intent]}`]: intent,
|
{description && <AlertDesc>{description}</AlertDesc>}
|
||||||
})}
|
{children && <AlertDesc>{children}</AlertDesc>}
|
||||||
>
|
</AlertRoot>
|
||||||
{title && <h3 className={clsx(Style.title)}>{title}</h3>}
|
|
||||||
{description && <p class={clsx(Style.description)}>{description}</p>}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const AlertRoot = styled.div`
|
||||||
|
border: 1px solid rgb(223, 227, 230);
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 6px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
|
${(props) =>
|
||||||
|
props.intent === 'danger' &&
|
||||||
|
`
|
||||||
|
border-color: rgb(249, 198, 198);
|
||||||
|
background: rgb(255, 248, 248);
|
||||||
|
|
||||||
|
${AlertDesc} {
|
||||||
|
color: #d95759;
|
||||||
|
}
|
||||||
|
${AlertTitle} {
|
||||||
|
color: rgb(205, 43, 49);
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
|
||||||
|
${(props) =>
|
||||||
|
props.intent === 'primary' &&
|
||||||
|
`
|
||||||
|
background: #fff;
|
||||||
|
border-color: #98a8ee;
|
||||||
|
|
||||||
|
${AlertTitle} {
|
||||||
|
color: #1a3bd4;
|
||||||
|
}
|
||||||
|
${AlertDesc} {
|
||||||
|
color: #455883;
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
`;
|
||||||
|
|
||||||
|
const AlertTitle = styled.h3`
|
||||||
|
color: rgb(17, 24, 28);
|
||||||
|
margin-bottom: 4px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
`;
|
||||||
|
|
||||||
|
const AlertDesc = styled.p`
|
||||||
|
color: rgb(104, 112, 118);
|
||||||
|
margin: 0;
|
||||||
|
`;
|
||||||
|
|||||||
@@ -1,32 +1,26 @@
|
|||||||
.root {
|
.root {
|
||||||
border: 1px solid rgb(223, 227, 230);
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 6px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
|
|
||||||
&_danger {
|
&_danger {
|
||||||
border-color: rgb(249, 198, 198);
|
|
||||||
background: rgb(255, 248, 248);
|
|
||||||
|
|
||||||
.description {
|
|
||||||
color: #d95759;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
&__primary{
|
||||||
color: rgb(205, 43, 49);
|
|
||||||
|
|
||||||
|
.title{
|
||||||
|
color: #1a3bd4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
color: rgb(17, 24, 28);
|
|
||||||
margin-bottom: 4px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.description {
|
.description {
|
||||||
color: rgb(104, 112, 118);
|
|
||||||
margin: 0;
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,9 @@ import React from 'react';
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import clsx from 'classnames';
|
import clsx from 'classnames';
|
||||||
|
import { Intent } from '@blueprintjs/core';
|
||||||
|
|
||||||
|
import { Alert } from 'components';
|
||||||
import { TransactionsLockingProvider } from './TransactionsLockingProvider';
|
import { TransactionsLockingProvider } from './TransactionsLockingProvider';
|
||||||
import { TransactionLockingContent } from './components';
|
import { TransactionLockingContent } from './components';
|
||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
@@ -67,8 +70,17 @@ function TransactionsLockingListPage({
|
|||||||
ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||||
tempor incididunt ut labore et dolore magna aliqua.
|
tempor incididunt ut labore et dolore magna aliqua.
|
||||||
</TransLockingDesc>
|
</TransLockingDesc>
|
||||||
Lock All Transactions At Once.{' '}
|
|
||||||
<Link to={'/'}> {''}Lock All Transactions At Once →</Link>
|
<LockAllAlert
|
||||||
|
title={'Lock All Transactions At Once.'}
|
||||||
|
intent={Intent.PRIMARY}
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
|
||||||
|
eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||||
|
</p>
|
||||||
|
<Link to={'/'}>Lock All Transactions At Once →</Link>
|
||||||
|
</LockAllAlert>
|
||||||
</TransactionsLockingParagraph>
|
</TransactionsLockingParagraph>
|
||||||
|
|
||||||
<TransactionsLockingList items={DataTest} />
|
<TransactionsLockingList items={DataTest} />
|
||||||
@@ -81,7 +93,7 @@ export default compose(withDialogActions)(TransactionsLockingListPage);
|
|||||||
const TransactionsLocking = styled.div`
|
const TransactionsLocking = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 32px;
|
padding: 32px 40px;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -94,3 +106,9 @@ const TransLockingTitle = styled.h2`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const TransLockingDesc = styled.p``;
|
const TransLockingDesc = styled.p``;
|
||||||
|
|
||||||
|
const LockAllAlert = styled(Alert)`
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-top: 20px;
|
||||||
|
background: transparent;
|
||||||
|
`;
|
||||||
|
|||||||
Reference in New Issue
Block a user