forked from binary-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into evgeniy-wall-376/likhith-wall-379/verifica…
…tion_ux_improvement_with_example
- Loading branch information
Showing
18 changed files
with
336 additions
and
314 deletions.
There are no files selected for viewing
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,18 @@ | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
|
||
name: 'Close stale issues and PRs' | ||
on: | ||
schedule: | ||
- cron: '30 1 * * *' | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v8 | ||
with: | ||
stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.' | ||
days-before-stale: 60 | ||
days-before-close: 5 |
233 changes: 0 additions & 233 deletions
233
packages/appstore/src/components/main-title-bar/__tests__/asset-summary.spec.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
packages/cashier/src/components/alert-banner/__tests__/alert-banner.spec.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,16 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import AlertBanner from '../alert-banner'; | ||
|
||
describe('<AlertBanner />', () => { | ||
it('should render the icon and message props passed for the banner', () => { | ||
const props: React.ComponentProps<typeof AlertBanner> = { | ||
icon: 'IcAlertWarningDark', | ||
message: 'Alert banner test message.', | ||
}; | ||
render(<AlertBanner {...props} />); | ||
const dt_alert_banner_icon = screen.getByTestId('dt_alert_banner_icon'); | ||
expect(dt_alert_banner_icon).toBeInTheDocument(); | ||
expect(screen.getByText(props.message)).toBeInTheDocument(); | ||
}); | ||
}); |
13 changes: 13 additions & 0 deletions
13
packages/cashier/src/components/alert-banner/alert-banner.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,13 @@ | ||
.alert-banner { | ||
display: grid; | ||
grid-template-columns: auto auto; | ||
width: auto; | ||
padding: 0.8rem; | ||
margin: 2.4rem 0; | ||
border-radius: $BORDER_RADIUS; | ||
background-color: $alpha-color-yellow-1; | ||
|
||
svg { | ||
margin: 0.3rem 0.3rem 0 0; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/cashier/src/components/alert-banner/alert-banner.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,23 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import { Icon, Text } from '@deriv/components'; | ||
import './alert-banner.scss'; | ||
|
||
type TAlertBanner = { | ||
className?: string; | ||
icon: string; | ||
message: string; | ||
}; | ||
|
||
const AlertBanner = ({ className, icon, message }: TAlertBanner) => { | ||
return ( | ||
<div className={classNames('alert-banner', className)}> | ||
<Icon size={16} icon={icon} data_testid='dt_alert_banner_icon' /> | ||
<Text as='p' align='center' size='xs'> | ||
{message} | ||
</Text> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AlertBanner; |
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
Oops, something went wrong.