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(SimpleCell): fix before icon offset (iOS) #6829

Merged
merged 2 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ export const SimpleCellPlayground = (props: ComponentPlaygroundProps) => {
],
indicator: ['1:20:22'],
},
{
before: [<Icon28MessageOutline key="icon" />],
children: ['Title'],
},
]}
>
{(props: SimpleCellProps) => <SimpleCell {...props} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
padding-inline-end: 4px;
}

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.SimpleCell__before--ios > :global(.vkuiIcon) {
padding-inline-end: 0;
BlackySoul marked this conversation as resolved.
Show resolved Hide resolved
}

.SimpleCell__before:empty {
display: none;
}
Expand Down
9 changes: 8 additions & 1 deletion packages/vkui/src/components/SimpleCell/SimpleCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ export const SimpleCell = ({
className,
)}
>
<div className={styles['SimpleCell__before']}>{before}</div>
<div
className={classNames(
styles['SimpleCell__before'],
platform === 'ios' && styles['SimpleCell__before--ios'],
)}
>
{before}
</div>
<div className={styles['SimpleCell__middle']}>
{subhead && (
<Subhead
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.
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.
Loading