polestar-ui-kit
Version:
## Install
45 lines (34 loc) • 1.32 kB
Markdown
Tab component example:
```js
const tabPanes = [
{key:'key1', title: 'Tab1', contents:<div>Contents1<br/>...<br/>...</div>},
{key:'key2', title: 'Tab2', contents:<div>Contents2<br/>...<br/>...</div>},
{key:'key3', title: 'Tab3', contents:<div>Contents3<br/>...<br/>...</div>},
];
<Tab panes={tabPanes} />
```
Wizard component props usage:
```jsx static
import Icon from 'polestar-icons';
const tabPanes = [
{ key: 'key1', <-탭 유니크키 필수
title: 'Tab1', <-탭 타이틀 필수
또는 title: <span><Icon name="home"/>Tab1</span>,
contents:<div>내용</div> <-컨텐츠 영역 필수
closable: true, <-탭 제거 여부 (type: editable-card 인 경우만 사용)
disabled: true, <-탭 비활성 여부
},
...
];
<Tabs
panes={tabPanes}
type='line' (line|card|editable-card)
position='top' (top|left)
defaultActiveKey={'key1'}
animated={true}
hideAdd={true} (type이 editable-card 일때만 반영됨)
onClickAdd={()=>{...}} (type이 editable-card 일때만 반영됨)
onChange={(key)=>{...}}
ref={(ref) => { this.tab = ref; }}
/>
```