-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Informer): add _view_outline (#3791)
closes #3511 --------- Co-authored-by: alyonurchick1 <[email protected]>
- Loading branch information
1 parent
d1f87de
commit 35d82b0
Showing
8 changed files
with
151 additions
and
129 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 |
---|---|---|
@@ -1,28 +1,33 @@ | ||
.Informer { | ||
padding: var(--space-s) var(--space-m); | ||
color: var(--color-typo-primary); | ||
border-radius: var(--control-radius); | ||
|
||
&_withIcon { | ||
display: flex; | ||
flex-wrap: nowrap; | ||
} | ||
background-color: var(--informer-bg); | ||
border-radius: var(--space-xs); | ||
|
||
&_view { | ||
&_bordered { | ||
background-color: var(--color-bg-default); | ||
border-left: var(--space-xs) solid var(--informer-status-color); | ||
--informer-bg: var(--color-bg-default); | ||
border-left: var(--space-xs) solid var(--informer-bg-color); | ||
box-shadow: var(--shadow-layer); | ||
} | ||
|
||
&_filled { | ||
background-color: var(--informer-status-color); | ||
--informer-bg: var(--informer-bg-color); | ||
} | ||
|
||
&_outline { | ||
--informer-icon-color: var(--informer-typo-color); | ||
--informer-bg: | ||
color-mix( | ||
in srgb, | ||
var(--informer-bg-color) var(--informer-bg-opacity), | ||
var(--color-bg-default) | ||
); | ||
border: var(--control-border-width) solid var(--informer-border-color); | ||
} | ||
} | ||
|
||
&-Icon { | ||
margin-right: var(--space-s); | ||
transform: translateY(var(--space-3xs)); | ||
flex-shrink: 0; | ||
flex: 1; | ||
color: var(--informer-icon-color, inherit); | ||
} | ||
} |
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
32 changes: 32 additions & 0 deletions
32
src/components/Informer/__stand__/examples/InformerExampleStatus/InformerExampleStatus.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,32 @@ | ||
import { Example } from '@consta/stand'; | ||
import React from 'react'; | ||
|
||
import { Informer } from '../../../Informer'; | ||
|
||
export const InformerExampleStatus = () => ( | ||
<Example col={{ 1: 0, 2: 720 }}> | ||
<Informer | ||
status="success" | ||
view="filled" | ||
label="Файл Отпуск_2025 успешно загружен" | ||
/> | ||
<Informer | ||
status="warning" | ||
view="filled" | ||
title="Заполните все поля" | ||
label="Поле Конец отпуска не заполнено" | ||
/> | ||
<Informer | ||
status="alert" | ||
view="filled" | ||
title="Не удалось загрузить файл" | ||
label="Максимальный размер файла 20 Гб" | ||
/> | ||
<Informer | ||
status="system" | ||
view="filled" | ||
title="Файл сохранен" | ||
label="Файл Отпуск_2025 сохранен на Рабочий стол" | ||
/> | ||
</Example> | ||
); |
Oops, something went wrong.