Skip to content

Commit

Permalink
fix: Loosen peer-dependencies, ConfirmDialog fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandarDev committed Nov 27, 2023
1 parent f690308 commit f2f7c93
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 27 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/npm-publish-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ jobs:
publish:
name: Publish ${{ inputs.name }}
runs-on: ubuntu-latest
concurrency: ci-${{ github.ref }}
concurrency: ci-${{ github.ref }}-${{ inputs.name }}
steps:
# Ensuring that only one PR-environment-creation per branch will run at a time
- name: Mutex setup
uses: ben-z/[email protected]
with:
branch: "mutex/${{ github.event.workflow_run.head_branch }}-publish"
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/[email protected]
Expand All @@ -30,15 +35,14 @@ jobs:
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git pull
- name: Changelog
id: version-bump
uses: Enterwell/ChangelogManager-GitHub-Action@v3
with:
changelog-location: ./packages/${{ inputs.name }}
should-bump-version: true
changes-location: ./packages/${{ inputs.name }}/changes
path-to-project-file: ./packages/${{ inputs.name }}/package.json
path-to-project-file: ./packages/${{ inputs.name }}/package.json\
- name: Commit changelog changes
uses: EndBug/[email protected]
with:
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"typescript": "5.3.2"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^18",
"react-dom": "^18"
}
}
Empty file.
10 changes: 5 additions & 5 deletions packages/react-mui-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
},
"peerDependencies": {
"@enterwell/react-ui": "workspace:*",
"@mui/material": "5.14.18",
"@mui/x-data-grid": "6.18.2",
"@mui/x-data-grid-pro": "6.18.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"@mui/material": "^5",
"@mui/x-data-grid": "^6",
"@mui/x-data-grid-pro": "^6",
"react": "^18",
"react-dom": "^18"
}
}
13 changes: 6 additions & 7 deletions packages/react-ui/ConfirmDialog/ConfirmDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
Button,
Typography,
type DialogProps,
type ButtonProps,
} from '@mui/material';
import { Stack } from '@mui/system';
import { ComponentProps } from 'react';

/**
* The confirm dialog props type.
Expand All @@ -17,7 +17,7 @@ export type ConfirmDialogProps = Omit<DialogProps, "open" | "onClose" | "color">
isOpen: boolean;
header: string;
message?: string;
color?: ComponentProps<typeof Button>['color'];
color?: ButtonProps["color"];
confirmButtonText?: string;
cancelButtonText?: string;
onConfirm: () => void;
Expand All @@ -36,7 +36,6 @@ export function ConfirmDialog({
header,
message,
maxWidth = "xs",
fullWidth = true,
color = "primary",
confirmButtonText = "Potvrdi",
cancelButtonText = "Odustani",
Expand All @@ -45,11 +44,11 @@ export function ConfirmDialog({
...rest
}: ConfirmDialogProps) {
return (
<Dialog open={isOpen} onClose={onCancel} {...rest}>
<Dialog open={isOpen} onClose={onCancel} maxWidth={maxWidth} {...rest}>
<DialogContent>
<Stack spacing={2}>
<Typography variant="h5" textAlign="center" paddingTop={4} paddingX={3}>{header}</Typography>
{message && <Typography variant="body1" color="textSecondary" textAlign="center" paddingX={3}>{message}</Typography>}
<Stack spacing={2} paddingX={3}>
<Typography variant="h2" textAlign="center" paddingTop={4}>{header}</Typography>
{message && <Typography color="textSecondary" textAlign="center">{message}</Typography>}
</Stack>
</DialogContent>
<DialogActions sx={{ p: 3 }}>
Expand Down
Empty file.
Empty file.
20 changes: 10 additions & 10 deletions packages/react-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
"typescript": "5.3.2"
},
"peerDependencies": {
"@emotion/react": "11.11.1",
"@emotion/styled": "11.11.0",
"@mui/material": "5.14.18",
"@mui/system": "5.14.18",
"@mui/lab": "5.0.0-alpha.153",
"@mui/x-date-pickers-pro": "5.0.20",
"@mui/x-date-pickers": "5.0.20",
"react": "18.2.0",
"react-dom": "18.2.0",
"date-fns": "2.30.0"
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@mui/material": "^5",
"@mui/system": "^5",
"@mui/lab": "^5",
"@mui/x-date-pickers-pro": "^5",
"@mui/x-date-pickers": "^5",
"react": "^18",
"react-dom": "^18",
"date-fns": "^2"
}
}

0 comments on commit f2f7c93

Please sign in to comment.