diff --git a/docs/examples/basic.tsx b/docs/examples/basic.tsx index c92eed9f..d9d9e076 100644 --- a/docs/examples/basic.tsx +++ b/docs/examples/basic.tsx @@ -8,7 +8,7 @@ export default () => { Light , - + Bamboo , diff --git a/package.json b/package.json index 544beac8..b64af1c6 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "docs:deploy": "gh-pages -d .doc", "compile": "father build && npm run compile:style", "test": "father test", + "test:update": "father test --u", "coverage": "father test --coverage", "now-build": "npm run build", "lint": "eslint src/ docs/examples/ --ext .tsx,.ts,.jsx,.js", @@ -67,7 +68,7 @@ "react-dnd": "^10.0.0", "react-dnd-html5-backend": "^10.0.0", "react-dom": "^16.0.0", - "react-router": "^3.0.0", + "react-router": "^5.0.0", "react-sticky": "^6.0.3", "react-test-renderer": "^16.0.0", "sortablejs": "^1.7.0", diff --git a/src/TabNavList/TabNode.tsx b/src/TabNavList/TabNode.tsx index b9aa7b55..4a3101d2 100644 --- a/src/TabNavList/TabNode.tsx +++ b/src/TabNavList/TabNode.tsx @@ -18,6 +18,7 @@ export interface TabNodeProps { onRemove: () => void; onFocus: React.FocusEventHandler; style?: React.CSSProperties; + className?: string; } function TabNode( @@ -34,6 +35,7 @@ function TabNode( onRemove, onFocus, style, + className, }: TabNodeProps, ref: React.Ref, ) { @@ -63,7 +65,7 @@ function TabNode(
) { } const tabNodes: React.ReactElement[] = tabs.map((tab, i) => { - const { key } = tab; + const { key, className: tabClassName } = tab; return ( ) { tab={tab} /* first node should not have margin left */ style={i === 0 ? undefined : tabNodeStyle} + className={tabClassName} closable={tab.closable} editable={editable} active={key === activeKey} diff --git a/tests/__snapshots__/index.test.tsx.snap b/tests/__snapshots__/index.test.tsx.snap index 08483b9b..b232b3ba 100644 --- a/tests/__snapshots__/index.test.tsx.snap +++ b/tests/__snapshots__/index.test.tsx.snap @@ -30,7 +30,7 @@ exports[`Tabs.Basic Normal 1`] = `
{ Light , - + Bamboo ,