Skip to content

Commit

Permalink
Merge pull request #459 from uidu-org/feat-remove-router-from-button
Browse files Browse the repository at this point in the history
docs(changeset): Removed react-router-dom from button
  • Loading branch information
apuntovanini authored Sep 6, 2024
2 parents c0c4c34 + 76e0b06 commit c5ac6e4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 20 deletions.
5 changes: 5 additions & 0 deletions .changeset/rich-eggs-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@uidu/button': minor
---

Removed react-router-dom from button
9 changes: 1 addition & 8 deletions packages/core/button/examples/10-Button.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import * as React from 'react';
import { MemoryRouter } from 'react-router';
import Button, { RouterButton } from '..';
import Button from '..';

console.log(Button);

export default () => (
<MemoryRouter>
<RouterButton
to={{ pathname: '/', state: { foo: 'bar' } }}
tw="bg-red-200 text-red-700"
appearance="primary"
>
Button
</RouterButton>
<Button
forwardedAs={'a'}
href="https://uidu.org"
Expand Down
3 changes: 1 addition & 2 deletions packages/core/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
"react-router-dom": "^5.3.4"
},
"peerDependencies": {
"react": "^18.0.0",
"react-router-dom": "*"
"react": "^18.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 0 additions & 8 deletions packages/core/button/src/components/RouterButton.tsx

This file was deleted.

1 change: 0 additions & 1 deletion packages/core/button/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import Button from './components/Button';

export { default as ButtonGroup } from './components/ButtonGroup';
export { default as RouterButton } from './components/RouterButton';
export type { ButtonAppearances, ButtonProps } from './types';

export default Button;
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8068,7 +8068,6 @@ __metadata:
tslib: "npm:^2.7.0"
peerDependencies:
react: ^18.0.0
react-router-dom: "*"
languageName: unknown
linkType: soft

Expand Down

0 comments on commit c5ac6e4

Please sign in to comment.