Skip to content

Commit

Permalink
fix: rename noVisor to float
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackySoul committed Dec 15, 2023
1 parent c93985b commit ceceadb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/vkui/src/components/Panel/Panel.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/* stylelint-disable selector-max-universal */

.Panel__centered :global(.vkuiInternalPanelHeader--vis) + * {
.Panel__centered :global(.vkuiInternalPanelHeader--static) + * {
margin-block-start: var(--vkui_internal--panel_header_height);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
position: relative;
}

.PanelHeader--vis.PanelHeader--fixed::before {
.PanelHeader--static.PanelHeader--fixed::before {
display: block;
content: '';
}

.PanelHeader:not(.PanelHeader--vis):not(.PanelHeader--fixed) {
.PanelHeader:not(.PanelHeader--static):not(.PanelHeader--fixed) {
block-size: 0;
/* см. https://github.com/VKCOM/VKUI/issues/5571 */
z-index: var(--vkui_internal--z_index_panel_header);
Expand Down
18 changes: 9 additions & 9 deletions packages/vkui/src/components/PanelHeader/PanelHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ export interface PanelHeaderProps
transparent?: boolean;
shadow?: boolean;
/**
* Позволяет задать шапку нулевой высоты (контент панели не будет её учитывать)
* Высота шапки будет игнорироваться контентом панели
*/
noVisor?: boolean;
float?: boolean;
/**
* Если `false`, то шапка будет в потоке. По умолчанию `true`, но если платформа vkcom, то по умолчанию `false`.
*/
Expand Down Expand Up @@ -120,7 +120,7 @@ export const PanelHeader = ({
before,
children,
after,
noVisor = false,
float = false,
transparent = false,
delimiter = 'auto',
shadow,
Expand All @@ -136,8 +136,8 @@ export const PanelHeader = ({
const isVKCOM = platform === 'vkcom';
const isFixed = fixed !== undefined ? fixed : !isVKCOM;
const separatorVisible = delimiter === 'auto' || delimiter === 'separator';
const visorSeparatorVisible = !noVisor && separatorVisible;
const visorSpacingVisible = !noVisor && (delimiter === 'auto' || delimiter === 'spacing');
const staticSeparatorVisible = !float && separatorVisible;
const staticSpacingVisible = !float && (delimiter === 'auto' || delimiter === 'spacing');

return (
<RootComponent
Expand All @@ -150,8 +150,8 @@ export const PanelHeader = ({
: platformClassNames.android,
transparent && styles['PanelHeader--trnsp'],
shadow && styles['PanelHeader--shadow'],
!noVisor && classNames(styles['PanelHeader--vis'], 'vkuiInternalPanelHeader--vis'),
visorSeparatorVisible &&
!float && classNames(styles['PanelHeader--static'], 'vkuiInternalPanelHeader--static'),
staticSeparatorVisible &&
classNames(styles['PanelHeader--sep'], 'vkuiInternalPanelHeader--sep'),
!before &&
classNames(styles['PanelHeader--no-before'], 'vkuiInternalPanelHeader--no-before'),
Expand Down Expand Up @@ -179,10 +179,10 @@ export const PanelHeader = ({
)}
{!isVKCOM && (
<>
{visorSeparatorVisible && adaptiveSizeX.compact && (
{staticSeparatorVisible && adaptiveSizeX.compact && (
<Separator className={adaptiveSizeX.compact.className} />
)}
{visorSpacingVisible && adaptiveSizeX.regular && (
{staticSpacingVisible && adaptiveSizeX.regular && (
<Spacing className={adaptiveSizeX.regular.className} size={16} />
)}
</>
Expand Down
4 changes: 2 additions & 2 deletions styleguide/pages/migration_v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
## [`PanelHeader`](#/PanelHeader)

- Свойство `visor` удалено, используйте свойство `noVisor`
- Свойство `visor` удалено, используйте свойство `float`

```diff
- <PanelHeader visor />
+ <PanelHeader />
- <PanelHeader visor={false} />
+ <PanelHeader noVisor />
+ <PanelHeader float />
```

- Свойство `separator` удалено, используйте свойство `delimiter`
Expand Down

0 comments on commit ceceadb

Please sign in to comment.