Skip to content

Commit

Permalink
Restore plain color
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Oct 18, 2023
1 parent 500a178 commit 5ac2f4b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src-docs/src/views/comment/comment_flexible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export default () => {
}> = [
{ value: 'subdued', text: 'subdued' },
{ value: 'transparent', text: 'transparent' },
{ value: 'plain', text: 'plain' },
{ value: 'danger', text: 'danger' },
{ value: 'warning', text: 'warning' },
{ value: 'accent', text: 'accent' },
Expand Down
1 change: 1 addition & 0 deletions src/components/comment_list/comment_event.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const meta: Meta<EuiCommentEventProps> = {
undefined,
'subdued',
'transparent',
'plain',
'warning',
'danger',
'success',
Expand Down
3 changes: 3 additions & 0 deletions src/components/comment_list/comment_event.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export const euiCommentEventBorderColors = ({
transparent: css`
border-color: ${euiTheme.border.color};
`,
plain: css`
border-color: ${euiTheme.border.color};
`,
};
};

Expand Down
3 changes: 2 additions & 1 deletion src/components/comment_list/comment_event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface EuiCommentEventProps extends CommonProps {
/**
* Background color for the comment's header.
*/
eventColor?: Exclude<EuiPanelProps['color'], 'plain'>;
eventColor?: EuiPanelProps['color'];
}

export const EuiCommentEvent: FunctionComponent<EuiCommentEventProps> = ({
Expand Down Expand Up @@ -106,6 +106,7 @@ export const EuiCommentEvent: FunctionComponent<EuiCommentEventProps> = ({
color: type === 'custom' ? 'transparent' : eventColor,
paddingSize: type === 'custom' ? 'none' : 's',
borderRadius: type === 'regular' ? 'none' : 'm',
hasShadow: false, // `plain` color needs this
}),
[type, eventColor]
);
Expand Down

0 comments on commit 5ac2f4b

Please sign in to comment.