Skip to content

Commit

Permalink
fix(ImageBase): fix bug with css selectors of ImageBase (#8004)
Browse files Browse the repository at this point in the history
* fix(ImageBase): remove Avatar margins in PanelHeader

* fix(ImageBase): fix bug with css selectors of ImageBase

* test(PanelHeader): add screens with Avatar and PanelHeaderButton
  • Loading branch information
EldarMuhamethanov authored Dec 18, 2024
1 parent 5c7e8d9 commit bee583b
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/vkui/src/components/ImageBase/ImageBase.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@
* PanelHeader
*/
/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
:global(.vkuiInternalPanelHeader__before) .host {
:global(.vkuiInternalPanelHeader__before) > .host {
margin-inline-start: 8px;
}

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
:global(.vkuiInternalPanelHeader__after) .host {
:global(.vkuiInternalPanelHeader__after) > .host {
margin-inline-end: 8px;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ComponentPlayground, type ComponentPlaygroundProps } from '@vkui-e2e/playground-helpers';
import { Avatar } from '../Avatar/Avatar';
import { Div } from '../Div/Div';
import { PanelHeaderButton } from '../PanelHeaderButton/PanelHeaderButton';
import { PanelHeader, type PanelHeaderProps } from './PanelHeader';

export const PanelHeaderPlayground = (props: ComponentPlaygroundProps) => {
Expand All @@ -14,6 +16,32 @@ export const PanelHeaderPlayground = (props: ComponentPlaygroundProps) => {
fixed: [false],
$adaptivity: 'x',
},
{
delimiter: ['auto'],
children: ['PanelHeader'],
after: [
<Avatar size={36} key="avatar" />,
<PanelHeaderButton key="header-button">
<Avatar size={36} />
</PanelHeaderButton>,
],
// Чтобы шапка в примерах не улетала наверх
fixed: [false],
$adaptivity: 'x',
},
{
delimiter: ['auto'],
children: ['PanelHeader'],
before: [
<Avatar size={36} key="avatar" />,
<PanelHeaderButton key="header-button">
<Avatar size={36} />
</PanelHeaderButton>,
],
// Чтобы шапка в примерах не улетала наверх
fixed: [false],
$adaptivity: 'x',
},
]}
>
{(props: PanelHeaderProps) => (
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bee583b

Please sign in to comment.