diff --git a/README.md b/README.md index c332aa7..32a49ac 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ Each event in the timeline will be represented by the `TimelineEvent` component. | createdAt | node | The time at which the event occurred. Can be datetime string or any DOM element node(s) | | icon | node | The icon to show as event lable. Can be a SVG or font icon | | iconColor | string | CSS color code for icon | +| iconStyle | node | Custom CSS for the icon | | buttons | node | Action buttons to display to the right of the event content | | contentStyle | node | Override content style | | style | node | Override style for the entire event container | diff --git a/components/TimelineEvent.js b/components/TimelineEvent.js index 6cf98b6..ea91a70 100644 --- a/components/TimelineEvent.js +++ b/components/TimelineEvent.js @@ -28,16 +28,19 @@ class TimelineEvent extends Component { return this.showAsCard() ? {...s.eventContainer, ...s.card, ...userStyle} : s.eventContainer } + iconStyle() { + return {...s.materialIcons, ...this.props.iconStyle} + } + render() { const {createdAt, title, contentStyle, buttons, icon, iconColor, container, ...otherProps} = this.props return