Skip to content

Commit

Permalink
fix: remove spinner todo (#7820)
Browse files Browse the repository at this point in the history
h2. Описание

У `Spinner` есть проп `noColor`, вместо css-каскада рекомендуем использовать его.

h2. Release notes

h2. BREAKING CHANGE

- PanelHeader: теперь неявно не переопределяется цвет компонента `Spinner`, если вы использовали компонент `Spinner` внутри `PanelHeader` передавайте `<Spinner noColor />`
  • Loading branch information
BlackySoul authored Oct 24, 2024
1 parent 6760ba7 commit 0f3f9db
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/vkui/src/components/Button/Button.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@
}

.spinner {
color: currentColor;
position: absolute;
inset: 0;
}
Expand Down
7 changes: 6 additions & 1 deletion packages/vkui/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ export const Button = ({
getRootRef={getRootRef}
>
{loading && (
<Spinner size="s" className={styles.spinner} disableAnimation={disableSpinnerAnimation} />
<Spinner
size="s"
className={styles.spinner}
disableAnimation={disableSpinnerAnimation}
noColor
/>
)}
<span className={styles.in}>
{hasReactNode(before) && (
Expand Down
10 changes: 0 additions & 10 deletions packages/vkui/src/components/Spinner/Spinner.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,3 @@
.noColor {
color: currentColor;
}

/**
* CMP:
* PanelHeader
* TODO [>=7]: удалить
*/
/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
:global(.vkuiInternalPanelHeader) .host {
color: currentColor;
}

0 comments on commit 0f3f9db

Please sign in to comment.