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

feat(Button, Link): add new prop - component #3421

Closed
wants to merge 75 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
88c19ce
chore: add types
Funkicide Apr 17, 2024
583a0ed
refactor(Link): add new component prop
Funkicide Apr 17, 2024
95d9bdb
refactor(Button): add new component prop
Funkicide Apr 17, 2024
51af3f6
chore: remove console.log
Funkicide Apr 17, 2024
47478d4
chore: fix style
Funkicide Apr 17, 2024
217e7d9
refactor(Button): fix types
Funkicide Apr 24, 2024
10ae5b2
refactor(Button): fix visuals when component=a
Funkicide Apr 24, 2024
e97f70e
refactor(Link): fix types
Funkicide Apr 24, 2024
67a1641
refactor(Link): fix visuals when href isn't set
Funkicide Apr 24, 2024
d65f850
refactor(Button): fix failed screenshot tests
Funkicide Apr 25, 2024
127c710
refactor(Button): fix styles
Funkicide Apr 25, 2024
6f84db5
test: update screenshots
Funkicide Apr 25, 2024
dd783ac
refactor(Button): filter out link props
Funkicide Apr 25, 2024
3001b7b
refactor: export correct types
Funkicide Apr 25, 2024
d3b9a6f
refactor(Button): add active styles for link
Funkicide Apr 26, 2024
95280f4
chore(Autocomplete): import single method instead of whole object
Funkicide Apr 26, 2024
66dd704
test(Link): add story for link as button
Funkicide Apr 26, 2024
dc48d33
refactor(Link): add validation states to link
Funkicide Apr 26, 2024
a902dc7
refactor(Button): update styles
Funkicide Apr 27, 2024
3564345
refactor(Button): add negative tabIndex to Button as link
Funkicide Apr 27, 2024
5f79e05
refactor(Button): make disabled button only prop
Funkicide May 1, 2024
ad49671
refactor(Link): update getRel method
Funkicide May 2, 2024
f521325
refactor(Button): add hrefLang to linkonly props
Funkicide May 2, 2024
5b3bf76
refactor(Button): disable focus on loading when component=a
Funkicide May 2, 2024
eb98278
test(Button): add test for Button component=a
Funkicide May 2, 2024
08cdaff
refactor(Link): restore href default value
Funkicide May 2, 2024
6f46399
refactor: fix typos
Funkicide May 6, 2024
d8b0731
test(Link): add test cases
Funkicide May 6, 2024
499b676
refactor(Link): add buttonOnly props
Funkicide May 6, 2024
5d0f6ea
refactor(Link): add disabled to link
Funkicide May 6, 2024
10e42be
refactor(Button): return disabled for component=a
Funkicide May 6, 2024
7ec2f61
test(Button, Link): remove disabled from test props
Funkicide May 6, 2024
142781f
test(Button, Link): add new stories
Funkicide May 13, 2024
9741a0e
test(Button): update stories
Funkicide May 13, 2024
9ee4e3a
test(Link): update stories
Funkicide May 13, 2024
2260c0c
docs(Button, Link): add examples for new component prop
Funkicide May 13, 2024
a95ca45
refactor(Link): fix RouterLink click
Funkicide May 13, 2024
9461ae5
refactor(Button): small fixes for old themes
Funkicide May 14, 2024
a5163d1
test(Button): update story
Funkicide May 14, 2024
a2923c8
test: add screenshots
Funkicide May 14, 2024
28007ac
Merge branch 'next' into button-link
Funkicide May 14, 2024
3038cb3
refactor(Link): remove disabled from root
Funkicide May 14, 2024
912aee7
refactor(Link): fix RouterLink click again
Funkicide May 14, 2024
045718b
refactor(Button, Link): rename props
Funkicide May 15, 2024
9cd4422
docs(Button): add deprecate message for use link
Funkicide May 15, 2024
787fea9
refactor(Button): replace lodash pick with custom version
Funkicide May 15, 2024
5b52b9c
Merge branch 'next' into button-link
zhzz Jul 3, 2024
b192363
refactor(Button): remove unnecessary type cast
Funkicide Jul 11, 2024
a35f1fe
chore(Button): add deprecation warning
Funkicide Jul 11, 2024
5d3e536
refactor(Button): don't use variable for type
Funkicide Jul 11, 2024
d55a0dd
refactor(Button, Link): restrict component prop values
Funkicide Jul 18, 2024
04e3df8
refactor(Button): update styles to work for any component value
Funkicide Jul 19, 2024
362ab77
refactor(Button): remove redundant props from proptype
Funkicide Jul 22, 2024
3a1a07c
refactor(Link): remove redundant props from proptype
Funkicide Jul 22, 2024
202b772
refactor(Button): remove redundant selectors
Funkicide Jul 22, 2024
c0c4581
refactor(Button): don't filter out root specific props
Funkicide Jul 22, 2024
a1d4898
refactor(Link): don't filter out root specific props except href and rel
Funkicide Jul 22, 2024
fae9f07
refactor(Link): add back empty href for accessible role
Funkicide Jul 22, 2024
4e31e32
test(Button, Link): remove prop filter tests
Funkicide Jul 22, 2024
8413ac4
refactor(Link): move type prop into rest
Funkicide Jul 22, 2024
00ce7ce
refactor(Link): remove rel from linkOnly props
Funkicide Jul 24, 2024
5469d94
refactor(Link): widen event type in handleClick
Funkicide Jul 24, 2024
9376f95
refactor(Button): widen type for node and eventhandlers
Funkicide Jul 25, 2024
60a2a68
refactor(Button): filter out classname prop from root props
Funkicide Jul 25, 2024
17ccbbb
test(Button): update screenshots
Funkicide Jul 25, 2024
343b8c5
Merge branch 'next' into button-link
Funkicide Jul 25, 2024
8dce2c7
test(Link): update screenshots
Funkicide Jul 25, 2024
12af8e8
refactor(Button): filter out props to prevent overrides
Funkicide Jul 25, 2024
4da47ec
test(Button): add test cases
Funkicide Jul 25, 2024
799819c
chore: wip
zhzz Sep 25, 2024
68c0de3
chore: wip
zhzz Sep 26, 2024
5dfdf53
Merge remote-tracking branch 'origin/next' into button-link-2
zhzz Sep 26, 2024
194f7a8
chore: small fixes
zhzz Sep 26, 2024
86c67fc
docs(Button,Link)): improve examples
zhzz Sep 26, 2024
d9095be
chore: fix props
zhzz Sep 26, 2024
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.
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
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/react-ui/components/Button/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,16 @@ const renderExampleRow = (title, styles, index) => {
</table>
```

Кнопка может рендерить ссылку в качестве корневого элемента, c помощью пропа `component`.

Кнопка принимает все пропы переданного в `component` компонента.

```jsx harmony
import { Button } from '@skbkontur/react-ui';

<Button component='a' href='https://kontur.ru' target="_blank">Ссылка, но выглядит как кнопка</Button>
```


Кнопка может быть узкой.

Expand Down
Loading