File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/ui-alerts/src/Alert Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ import keycode from 'keycode'
2828
2929import {
3030 callRenderProp ,
31- withDeterministicId
31+ withDeterministicId ,
32+ passthroughProps
3233} from '@instructure/ui-react-utils'
3334import { CloseButton } from '@instructure/ui-buttons'
3435import { View } from '@instructure/ui-view'
@@ -257,16 +258,18 @@ class Alert extends Component<AlertProps, AlertState> {
257258 }
258259
259260 renderAlert ( ) {
261+ const { margin, styles, children, ...props } = this . props
260262 return (
261263 < View
264+ { ...passthroughProps ( { ...props } ) }
262265 as = "div"
263- margin = { this . props . margin }
264- css = { this . props . styles ?. alert }
266+ margin = { margin }
267+ css = { styles ?. alert }
265268 onKeyUp = { this . handleKeyUp }
266269 elementRef = { this . handleRef }
267270 >
268271 { this . renderIcon ( ) }
269- < div css = { this . props . styles ?. content } > { this . props . children } </ div >
272+ < div css = { styles ?. content } > { children } </ div >
270273 { this . renderCloseButton ( ) }
271274 </ View >
272275 )
You can’t perform that action at this time.
0 commit comments