-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
881 additions
and
327 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
'@alfalab/core-components-spinner': major | ||
'@alfalab/core-components-action-button': patch | ||
'@alfalab/core-components-button': patch | ||
'@alfalab/core-components-confirmation': patch | ||
'@alfalab/core-components-custom-button': patch | ||
'@alfalab/core-components-file-upload-item': patch | ||
'@alfalab/core-components-shared': patch | ||
--- | ||
|
||
Крупное обновление Спиннера | ||
|
||
* Обновленный вид спиннера. | ||
* Добавлены новые пропсы для тонкой настройки внешнего вида: | ||
- `size` - теперь отвечает за размер кольца спиннера; | ||
- `lineWidth` - толщина линии спиннера; | ||
- `style` - позволяет регулировать отступы, цвет и т.п. | ||
* Добавлен преднастроенный вариант спиннера `Spinner.Preset`. | ||
* Добавлен `codemod` для бесшовной миграции со старого `Spinner` на `Spinner.Preset`: | ||
```bash | ||
npx @alfalab/core-components-codemod --transformers=spinner --glob='src/**/*.tsx' | ||
``` | ||
| Внимание | | ||
|---| | ||
| `codemod` может не работать в случаях использования [Spread Operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax#spread_in_object_literals) в коде. | |
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
4 changes: 2 additions & 2 deletions
4
...n-button/src/__image_snapshots__/action-button-disabled-loading-sprite-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
20 changes: 20 additions & 0 deletions
20
packages/codemod/src/spinner/__testfixtures__/transform.input.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,20 @@ | ||
import React from 'react'; | ||
|
||
import { Spinner } from '@alfalab/core-components-spinner'; | ||
|
||
export const Component = () => { | ||
const someProps = {}; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Spinner size='xs' /> | ||
<Spinner size='s' /> | ||
<Spinner size='m' /> | ||
<Spinner size={16} /> | ||
<Spinner size={24} /> | ||
<Spinner size={48} /> | ||
<Spinner visible={true} /> | ||
<Spinner {...someProps} /> | ||
</React.Fragment> | ||
); | ||
}; |
20 changes: 20 additions & 0 deletions
20
packages/codemod/src/spinner/__testfixtures__/transform.output.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,20 @@ | ||
import React from 'react'; | ||
|
||
import { Spinner } from '@alfalab/core-components-spinner'; | ||
|
||
export const Component = () => { | ||
const someProps = {}; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Spinner.Preset preset={16} /> | ||
<Spinner.Preset preset={24} /> | ||
<Spinner.Preset preset={48} /> | ||
<Spinner.Preset preset={16} /> | ||
<Spinner.Preset preset={24} /> | ||
<Spinner.Preset preset={48} /> | ||
<Spinner.Preset visible={true} /> | ||
<Spinner.Preset {...someProps} /> | ||
</React.Fragment> | ||
); | ||
}; |
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,6 @@ | ||
// eslint-disable-next-line prefer-destructuring | ||
const defineTest = require('jscodeshift/dist/testUtils').defineTest; | ||
|
||
jest.autoMockOff(); | ||
|
||
defineTest(__dirname, 'transform', null, 'transform', { parser: 'tsx' }); |
Oops, something went wrong.