Skip to content

Commit eca2d05

Browse files
authored
fix classNames support on tabbed card (#67)
* Fix classNames * v0.5.15
1 parent 959af4f commit eca2d05

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.5.14",
2+
"version": "0.5.15",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

src/card/TabbedCard.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { CardBaseProps } from './Card';
33
import { css } from '@emotion/core';
44
import { Text } from '../content';
55
import { cardCSS, headerCSS } from './styles';
6+
import { classNames } from '../utils';
67

78
const tabbedCardCSS = css`
89
&[data-has-title='false'] {
@@ -15,12 +16,22 @@ const tabbedCardCSS = css`
1516
export interface TabbedCardProps extends CardBaseProps {}
1617

1718
export function TabbedCard(props: TabbedCardProps) {
18-
const { title, children, extra, variant = 'default', ...restProps } = props;
19+
const {
20+
title,
21+
children,
22+
extra,
23+
variant = 'default',
24+
className,
25+
...restProps
26+
} = props;
1927
const hasTitle = title != null;
2028
return (
2129
<section
2230
css={css(cardCSS, tabbedCardCSS)}
23-
className={`ac-card ac-card--${variant} ac-card--tabbed`}
31+
className={classNames(
32+
`ac-card ac-card--${variant} ac-card--tabbed`,
33+
className
34+
)}
2435
data-has-title={hasTitle}
2536
{...restProps}
2637
>

0 commit comments

Comments
 (0)