-
Notifications
You must be signed in to change notification settings - Fork 49
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
47 changed files
with
904 additions
and
341 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,20 @@ | ||
--- | ||
'@alfalab/core-components-spinner': major | ||
'@alfalab/core-components-shared': minor | ||
--- | ||
|
||
Крупное обновление Спиннера | ||
|
||
* Обновленный вид спиннера. | ||
* Добавлены новые пропсы для тонкой настройки внешнего вида: | ||
- `preset` - преднастроенный вариант спиннера; | ||
- `size` - теперь отвечает за размер кольца спиннера; | ||
- `lineWidth` - толщина линии спиннера; | ||
- `style` - позволяет регулировать отступы, цвет и т.п. | ||
* Добавлен `codemod` для бесшовной миграции `Spinner`: | ||
```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
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 = { size: 48 }; | ||
|
||
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 = { size: 48 }; | ||
|
||
return ( | ||
<React.Fragment> | ||
<Spinner preset={16} /> | ||
<Spinner preset={24} /> | ||
<Spinner preset={48} /> | ||
<Spinner preset={16} /> | ||
<Spinner preset={24} /> | ||
<Spinner preset={48} /> | ||
<Spinner visible={true} /> | ||
<Spinner {...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.