forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from ahmadtaimoor-deriv/f_contract_details
Ahmad/Card Wrapper
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
packages/trader/src/AppV2/Components/CardWrapper/card-wrapper.scss
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,10 @@ | ||
.card-wrapper { | ||
background-color: var(--core-color-solid-slate-50); | ||
margin-top: 0.5rem; | ||
padding: 1rem; | ||
border-radius: 0.625rem; | ||
|
||
.title { | ||
margin-bottom: 1rem; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/trader/src/AppV2/Components/CardWrapper/card-wrapper.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,17 @@ | ||
import { Text } from '@deriv-com/quill-ui'; | ||
import React from 'react'; | ||
|
||
const CardWrapper = ({ title, children }: { title?: string; children: React.ReactNode }) => { | ||
return ( | ||
<div className='card-wrapper'> | ||
{title && ( | ||
<Text size='sm' bold className='title'> | ||
{title} | ||
</Text> | ||
)} | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default CardWrapper; |
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,4 @@ | ||
import CardWrapper from './card-wrapper'; | ||
import './card-wrapper.scss'; | ||
|
||
export default CardWrapper; |