diff --git a/README.md b/README.md index f9c2a4c..83521f6 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,9 @@ You can setup the following environment variables to configure your Switchblade # Change Log +## v1.1.2 (2024-12-24) +- Updated dependencies + ## v1.1.1 (2024-05-10) - Fixed an issue where pressing the escape key could take you to a different page if no modals or drawers were open - Updated dependencies diff --git a/package.json b/package.json index 5e64c30..f5c261d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "switchblade-ui", - "version": "1.1.1", + "version": "1.1.2", "author": "Mike Beasley", "scripts": { "start": "vite", diff --git a/src/components/Alert.jsx b/src/components/Alert.jsx index 5da40c0..549bf4b 100644 --- a/src/components/Alert.jsx +++ b/src/components/Alert.jsx @@ -2,7 +2,23 @@ import { classNames } from 'lib/util'; import animations from 'styles/animations.module.css'; import styles from 'styles/Alert.module.css'; -const Alert = ({ title, content, color, animated, centered, animation, ...props }) => ( +const Colors = { + White: "white", + Blue: "blue", + Red: "red", + Yellow: "yellow", + Green: "green" +} + +const Alert = ({ + title, + content, + color = Colors.Blue, + animated = true, + centered, + animation = animations.pullIn, + ...props +}) => (
) -Alert.Colors = { - White: "white", - Blue: "blue", - Red: "red", - Yellow: "yellow", - Green: "green" -} - -Alert.defaultProps = { - color: Alert.Colors.Blue, - animated: true, - animation: animations.pullIn -} +Alert.Colors = Colors; export default Alert; \ No newline at end of file diff --git a/src/components/Button.jsx b/src/components/Button.jsx index bbc62c2..9a652d8 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -1,7 +1,27 @@ import { classNames } from 'lib/util'; import styles from 'styles/Button.module.css'; -const Button = ({ children, size, block, color, ghost, inputButton, ...props }) => ( +const Colors = { + White: styles.white, + Blue: styles.blue, + Red: styles.red, + Green: styles.green +} + +const Sizes = { + Default: styles.default, + Large: styles.large +} + +const Button = ({ + children, + size = Sizes.Default, + block, + color = Colors.Blue, + ghost, + inputButton, + ...props +}) => (