Skip to content

Commit

Permalink
feat(alert): add style props (#602)
Browse files Browse the repository at this point in the history
affects: @gio-design/components

Co-authored-by: Jack <panjie@growingio.com>
  • Loading branch information
Lee Hon and jack0pan authored Dec 17, 2020
1 parent c4c4566 commit dacd79d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/components/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const Alert: React.FC<AlertProps> = (props: AlertProps) => {
icon,
type = 'info',
size = 'middle',
style,
} = props;

const getIcon = () => {
Expand All @@ -43,6 +44,7 @@ const Alert: React.FC<AlertProps> = (props: AlertProps) => {
return (
<div>
<div
style={style}
className={classnames(
prefixCls,
size === 'small' ? `${prefixCls}-small` : '',
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/components/alert/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ export interface AlertProps {
关闭时触发的回调函数
*/
onClose?: () => void;
/**
外层样式
*/
style?: React.CSSProperties;
}

1 comment on commit dacd79d

@vercel
Copy link

@vercel vercel bot commented on dacd79d Dec 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.