Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
fix(bannermessage) doesn't accept text wrapped in paragraph tag. (#315)
Browse files Browse the repository at this point in the history
don't assume a naked string is passed through. body container is now div. if naked string is passed, wrap it in paragraph tag.
  • Loading branch information
andrewleyva authored Oct 10, 2018
1 parent a0b034e commit b26c0c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/BannerMessage/BannerMessageBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import React from 'react'

const BannerMessageBody = props => {
const { children, ...rest } = props
const content = typeof children === 'string' ? <p>{children}</p> : children
return (
<p className='banner-message__body' {...rest}>
{children}
</p>
<div className='banner-message__body' {...rest}>
{content}
</div>
)
}

Expand Down

0 comments on commit b26c0c4

Please sign in to comment.