@arch-ui/alert
Advanced tools
Comparing version 0.0.15 to 0.0.16
# @arch-ui/alert | ||
## 0.0.16 | ||
### Patch Changes | ||
- [`63169b6a`](https://github.com/keystonejs/keystone/commit/63169b6a6b6a4dc286cd224b7f871960f2d4b0ad) [#2638](https://github.com/keystonejs/keystone/pull/2638) Thanks [@Vultraz](https://github.com/Vultraz)! - Removed uses of defaultProps for functional components. | ||
## 0.0.15 | ||
@@ -71,3 +77,3 @@ | ||
- [42c3fbc9](https://github.com/keystonejs/keystone-5/commit/42c3fbc9): Upgrade emotion to 10.0.14 | ||
- [42c3fbc9](https://github.com/keystonejs/keystone/commit/42c3fbc9): Upgrade emotion to 10.0.14 | ||
@@ -78,3 +84,3 @@ ## 0.0.6 | ||
- [19fe6c1b](https://github.com/keystonejs/keystone-5/commit/19fe6c1b): | ||
- [19fe6c1b](https://github.com/keystonejs/keystone/commit/19fe6c1b): | ||
@@ -87,3 +93,3 @@ Move frontmatter in docs into comments | ||
- [81dc0be5](https://github.com/keystonejs/keystone-5/commit/81dc0be5): | ||
- [81dc0be5](https://github.com/keystonejs/keystone/commit/81dc0be5): | ||
@@ -94,3 +100,3 @@ - Update dependencies | ||
- Updated dependencies [e75c105c](https://github.com/keystonejs/keystone-5/commit/e75c105c): | ||
- Updated dependencies [e75c105c](https://github.com/keystonejs/keystone/commit/e75c105c): | ||
- @arch-ui/theme@0.0.3 | ||
@@ -100,3 +106,3 @@ | ||
- [patch][7417ea3a](https://github.com/keystonejs/keystone-5/commit/7417ea3a): | ||
- [patch][7417ea3a](https://github.com/keystonejs/keystone/commit/7417ea3a): | ||
@@ -103,0 +109,0 @@ - Update patch-level dependencies |
@@ -35,4 +35,4 @@ 'use strict'; | ||
const Alert = styled.div(({ | ||
appearance, | ||
variant | ||
appearance = 'info', | ||
variant = 'subtle' | ||
}) => ({ | ||
@@ -52,7 +52,3 @@ backgroundColor: variant === 'bold' ? boldBackgroundColor[appearance] : subtleBackgroundColor[appearance], | ||
})); | ||
Alert.defaultProps = { | ||
appearance: 'info', | ||
variant: 'subtle' | ||
}; | ||
exports.Alert = Alert; |
@@ -33,3 +33,3 @@ "use strict"; | ||
danger: theme.colors.R.D20 | ||
}, Alert = styled.div(({appearance: appearance, variant: variant}) => ({ | ||
}, Alert = styled.div(({appearance: appearance = "info", variant: variant = "subtle"}) => ({ | ||
backgroundColor: "bold" === variant ? boldBackgroundColor[appearance] : subtleBackgroundColor[appearance], | ||
@@ -49,5 +49,2 @@ color: "bold" === variant ? boldTextColor[appearance] : subtleTextColor[appearance], | ||
Alert.defaultProps = { | ||
appearance: "info", | ||
variant: "subtle" | ||
}, exports.Alert = Alert; | ||
exports.Alert = Alert; |
@@ -29,4 +29,4 @@ import styled from '@emotion/styled'; | ||
const Alert = styled.div(({ | ||
appearance, | ||
variant | ||
appearance = 'info', | ||
variant = 'subtle' | ||
}) => ({ | ||
@@ -46,7 +46,3 @@ backgroundColor: variant === 'bold' ? boldBackgroundColor[appearance] : subtleBackgroundColor[appearance], | ||
})); | ||
Alert.defaultProps = { | ||
appearance: 'info', | ||
variant: 'subtle' | ||
}; | ||
export { Alert }; |
{ | ||
"name": "@arch-ui/alert", | ||
"description": "Alert component as used in @keystonejs Admin UI.", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"author": "Jed Watson", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -30,3 +30,3 @@ import styled from '@emotion/styled'; | ||
export const Alert = styled.div(({ appearance, variant }) => ({ | ||
export const Alert = styled.div(({ appearance = 'info', variant = 'subtle' }) => ({ | ||
backgroundColor: | ||
@@ -48,6 +48,1 @@ variant === 'bold' ? boldBackgroundColor[appearance] : subtleBackgroundColor[appearance], | ||
})); | ||
Alert.defaultProps = { | ||
appearance: 'info', | ||
variant: 'subtle', | ||
}; |
13179
181