-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(react-ui-validations): update deps (wip)
- Loading branch information
Showing
9 changed files
with
39 additions
and
272 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
module.exports = { | ||
stories: ['../stories/**/*.stories.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,15 @@ | ||
import { setFilter } from '@skbkontur/react-props2attrs'; | ||
import { findAmongParents } from '@skbkontur/react-sorge/lib'; | ||
|
||
setFilter(fiber => { | ||
// Транслируем все пропы только для контролов | ||
const isControlComponent = !!findAmongParents( | ||
fiber, | ||
fiberParent => fiberParent.type && typeof fiberParent.type.__KONTUR_REACT_UI__ === 'string', | ||
); | ||
if (isControlComponent) { | ||
return null; | ||
} | ||
// Для остальных компонентов ограничиваемся тестовыми идентификаторами | ||
return ['data-tid', 'data-testid']; | ||
}); |
21 changes: 21 additions & 0 deletions
21
packages/react-ui-validations/.storybook/preview-head.html
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,21 @@ | ||
<style> | ||
@font-face { | ||
font-family: 'Segoe UI'; | ||
font-weight: 400; | ||
src: local('Segoe UI'), local('SegoeUI'), | ||
url('//c.s-microsoft.com/static/fonts/segoe-ui/cyrillic/normal/latest.woff') format('woff'); | ||
} | ||
|
||
html, | ||
body { | ||
min-height: 100%; | ||
} | ||
|
||
body { | ||
font-family: 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif; | ||
font-size: 14px; | ||
margin: 0; | ||
background: white; | ||
color: rgba(0, 0, 0, 0.87); | ||
} | ||
</style> |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
94 changes: 0 additions & 94 deletions
94
packages/react-ui-validations/stories/styles/typography.less
This file was deleted.
Oops, something went wrong.
99 changes: 0 additions & 99 deletions
99
packages/react-ui-validations/stories/styles/variables.less
This file was deleted.
Oops, something went wrong.