chore(components): Show raised info above the pattern
This commit is contained in:
parent
b92feed66e
commit
83fa154219
2 changed files with 3 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
import React from 'react'
|
||||
import Event from './event'
|
||||
|
||||
const DraftEvents = ({ events }) => (
|
||||
const DraftEvents = ({ events, types = ['error', 'warning', 'debug'] }) => (
|
||||
<div className="draft-events">
|
||||
{['error', 'warning', 'debug'].map((type) => (
|
||||
{types.map((type) => (
|
||||
<div className={`events-${type}`} key={type}>
|
||||
{events[type].map((event, index) => (
|
||||
<Event event={event} type={type} key={index} />
|
||||
|
|
|
@ -36,6 +36,7 @@ const DraftPattern = (props) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<Events events={props.patternProps.events} types={['info']} />
|
||||
<Draft
|
||||
{...props.patternProps}
|
||||
design={props.design}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue