-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Compliance mock. Form errors design. Send dialog design (#93)
- Loading branch information
Showing
12 changed files
with
130 additions
and
15 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...es/circle-demo-webapp/app/components/ComplianceEngineText/ComplianceEngineText.stories.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { ComplianceEngineText } from './ComplianceEngineText'; | ||
|
||
const meta = { | ||
title: 'FormErrorText', | ||
component: ComplianceEngineText, | ||
tags: ['autodocs'], | ||
} satisfies Meta<typeof ComplianceEngineText>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
result: true, | ||
}, | ||
}; |
15 changes: 15 additions & 0 deletions
15
packages/circle-demo-webapp/app/components/ComplianceEngineText/ComplianceEngineText.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export function ComplianceEngineText({ result }: { result: boolean }) { | ||
return ( | ||
<div className="flex"> | ||
{result ? ( | ||
<p className="bg-teal-600/10 rounded-lg py-1 px-3 my-2 text-xs text-success"> | ||
Approved by Circle Compliance Engine ✓ | ||
</p> | ||
) : ( | ||
<p className="bg-teal-600/10 rounded-lg py-1 px-3 my-2 text-xs text-error denied"> | ||
Denied by Circle Compliance Engine ✘ | ||
</p> | ||
)} | ||
</div> | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
packages/circle-demo-webapp/app/components/ComplianceEngineText/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './ComplianceEngineText'; |
2 changes: 1 addition & 1 deletion
2
packages/circle-demo-webapp/app/components/FormErrorText/FormErrorText.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/circle-demo-webapp/app/routes/api.complianceScreenAddress.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ActionFunction } from '@remix-run/node'; | ||
|
||
import { assertCircleErrorResponse, errorResponse } from '~/lib/server.responses'; | ||
|
||
export const action: ActionFunction = () => { | ||
try { | ||
return Response.json({ | ||
result: 'APPROVED', | ||
id: {}, | ||
address: '0x1bf9ad0cc2ad298c69a2995aa806ee832788218c', | ||
chain: 'MATIC-AMOY', | ||
details: [ | ||
{ | ||
id: 'c4d1da72-111e-4d52-bdbf-2e74a2d803d5', | ||
vendor: 'VENDOR', | ||
response: {}, | ||
createDate: '2023-01-01T12:04:05Z', | ||
}, | ||
], | ||
alertId: {}, | ||
}); | ||
} catch (e: unknown) { | ||
assertCircleErrorResponse(e); | ||
|
||
return errorResponse(e.response.data.error.message); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,6 +91,7 @@ | |
* { | ||
@apply border-border; | ||
} | ||
|
||
body { | ||
@apply bg-background text-foreground; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters