diff --git a/src/components/EmptyState/EmptyState.scss b/src/components/EmptyState/EmptyState.scss index b6c6930efc..7eb1644fe1 100644 --- a/src/components/EmptyState/EmptyState.scss +++ b/src/components/EmptyState/EmptyState.scss @@ -10,10 +10,7 @@ &__wrapper { display: grid; - grid-template-areas: - 'image title' - 'image description' - 'image actions'; + grid-template-areas: 'image content'; &_size_xs { width: 321px; @@ -28,8 +25,8 @@ } &_size_m { - width: 800px; - height: 240px; + width: 600px; + height: 230px; } &_position_center { @@ -46,7 +43,7 @@ grid-area: image; justify-self: end; - margin-right: 60px; + margin-right: var(--g-spacing-10); color: var(--g-color-base-info-light-hover); @@ -56,9 +53,6 @@ } &__title { - align-self: center; - grid-area: title; - font-weight: 500; &_size_s { @@ -71,16 +65,11 @@ } &__description { - grid-area: description; - @include mixins.body-2-typography(); } - &__actions { - grid-area: actions; - - & > * { - margin-right: 8px; - } + &__content { + align-self: center; + grid-area: content; } } diff --git a/src/components/EmptyState/EmptyState.tsx b/src/components/EmptyState/EmptyState.tsx index cdb3afa627..a56e2741b1 100644 --- a/src/components/EmptyState/EmptyState.tsx +++ b/src/components/EmptyState/EmptyState.tsx @@ -1,4 +1,4 @@ -import {Icon} from '@gravity-ui/uikit'; +import {Flex, Icon, Text} from '@gravity-ui/uikit'; import {cn} from '../../utils/cn'; @@ -8,20 +8,22 @@ import './EmptyState.scss'; const block = cn('empty-state'); -const sizes = { +export const EMPTY_STATE_SIZES = { xs: 100, s: 150, - m: 250, + m: 230, l: 350, }; export interface EmptyStateProps { - title: string; + title: React.ReactNode; image?: React.ReactNode; description?: React.ReactNode; actions?: React.ReactNode[]; - size?: keyof typeof sizes; + size?: keyof typeof EMPTY_STATE_SIZES; position?: 'left' | 'center'; + pageTitle?: string; + className?: string; } export const EmptyState = ({ @@ -31,21 +33,33 @@ export const EmptyState = ({ actions, size = 'm', position = 'center', + pageTitle, + className, }: EmptyStateProps) => { return ( -