Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: markup for CustomAlert #591

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 9 additions & 13 deletions packages/desktop/src/main/ts/custom-alert/CustomAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
AlertBlockControl,
Breaker,
Card,
FlexItem,
FlexPos,
Expand All @@ -10,7 +9,6 @@ import {
} from '@qiwi/pijma-core'
import React, { FC, ReactNode } from 'react'

import { Paragraph } from '../typography'

export interface CustomAlertProps {
icon?: ReactNode
Expand All @@ -22,14 +20,14 @@ export interface CustomAlertProps {
}

export const CustomAlert: FC<CustomAlertProps> = ({
children,
icon,
bg,
shadow,
textColor,
onHide,
...rest
}) => {
children,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep formatting.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Исправила

icon,
bg,
shadow,
textColor,
onHide,
...rest
}) => {
return (
<AlertBlockControl
onHide={onHide}
Expand All @@ -50,9 +48,7 @@ export const CustomAlert: FC<CustomAlertProps> = ({
>
{icon && <FlexItem mr={3}>{icon}</FlexItem>}
<FlexItem>
<Paragraph color={textColor}>
<Breaker children={children} />
</Paragraph>
{children}
</FlexItem>
{onHide !== undefined ? (
<Pos
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 9 additions & 14 deletions packages/mobile/src/main/ts/custom-alert/CustomAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
AlertBlockControl,
Breaker,
Card,
FlexItem,
FlexPos,
Expand All @@ -10,8 +9,6 @@ import {
} from '@qiwi/pijma-core'
import React, { FC, ReactNode } from 'react'

import { Paragraph } from '../typography'

export interface CustomAlertProps {
icon?: ReactNode
shadow?: string
Expand All @@ -22,14 +19,14 @@ export interface CustomAlertProps {
}

export const CustomAlert: FC<CustomAlertProps> = ({
children,
icon,
bg,
shadow,
textColor,
onHide,
...rest
}) => {
children,
icon,
bg,
shadow,
textColor,
onHide,
...rest
}) => {
return (
<AlertBlockControl
onHide={onHide}
Expand All @@ -50,9 +47,7 @@ export const CustomAlert: FC<CustomAlertProps> = ({
>
{icon && <FlexItem mr={2}>{icon}</FlexItem>}
<FlexItem my="2px">
<Paragraph color={textColor}>
<Breaker children={children} />
</Paragraph>
{children}
</FlexItem>
{onHide !== undefined ? (
<Pos
Expand Down
Loading