@corex/bulma
Advanced tools
Comparing version 1.2.4 to 1.2.5
/// <reference types="react" /> | ||
import { ISize } from '../interface'; | ||
export interface IButtonGroupProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ISize { | ||
import { IAlignment, ISize } from '../interface'; | ||
export interface IButtonGroupProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ISize, IAlignment { | ||
hasAddons?: boolean; | ||
alignment?: 'centered' | 'right'; | ||
} |
export { default as Box } from './Box'; | ||
export { default as Breadcrumb } from './Breadcrumb'; | ||
export { default as Button } from './Button'; | ||
@@ -12,2 +13,3 @@ export { default as ButtonGroup } from './ButtonGroup'; | ||
export { default as Image } from './Image'; | ||
export { default as Message } from './Message'; | ||
export { default as Modal } from './Modal'; | ||
@@ -14,0 +16,0 @@ export { default as Notification } from './Notification'; |
export { default as Box } from './Box'; | ||
export { default as Breadcrumb } from './Breadcrumb'; | ||
export { default as Button } from './Button'; | ||
@@ -12,2 +13,3 @@ export { default as ButtonGroup } from './ButtonGroup'; | ||
export { default as Image } from './Image'; | ||
export { default as Message } from './Message'; | ||
export { default as Modal } from './Modal'; | ||
@@ -14,0 +16,0 @@ export { default as Notification } from './Notification'; |
export declare type BulmaSizes = 'small' | 'medium' | 'large' | 'normal'; | ||
export declare type BulmaColors = 'white' | 'black' | 'light' | 'dark' | 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'; | ||
export declare type BulmaBreakpoints = 'mobile' | 'tablet' | 'tablet-only' | 'touch' | 'desktop' | 'desktop-only' | 'widescreen' | 'widescreen-only' | 'fullhd'; | ||
export declare type BulmaAlignment = 'centered' | 'right' | 'left'; | ||
export interface IAlignment { | ||
alignment?: BulmaAlignment; | ||
} | ||
export interface ISize { | ||
@@ -5,0 +9,0 @@ size?: BulmaSizes; |
import React from 'react'; | ||
import { ITabsProps } from './interface'; | ||
declare const Tabs: React.FC<ITabsProps>; | ||
import { ITabsProps, IWrappedTabComponentProps } from './interface'; | ||
declare const Tabs: React.FC<ITabsProps> & IWrappedTabComponentProps; | ||
export default Tabs; |
import classnames from 'classnames'; | ||
import React from 'react'; | ||
const Tabs = ({ size, tabItems, type, activeKey, onClickItem, ...restProps }) => { | ||
const wrapperClass = classnames('tabs', { | ||
[`is-${size}`]: size | ||
import TabItem from './TabItem'; | ||
const Tabs = ({ className, children, size, alignment, fullwidth, variant, ...restProps }) => { | ||
const tabsCls = classnames('tabs', { className }, { | ||
'is-fullwidth': fullwidth | ||
}, { | ||
[`is-${type}`]: type | ||
[`is-${size}`]: size && size !== 'normal' | ||
}, { | ||
[`is-${alignment}`]: alignment && alignment !== 'left' | ||
}, { | ||
[`is-${variant}`]: variant | ||
}, { | ||
'is-toggle': variant === 'toggle-rounded' | ||
}); | ||
const onClickMenuItem = (key) => (onClickItem ? onClickItem(key) : {}); | ||
return (React.createElement("div", Object.assign({ className: wrapperClass }, restProps), | ||
React.createElement("ul", null, tabItems && | ||
tabItems.map(({ label, key }, index) => { | ||
const activeClass = classnames({ 'is-active': key === activeKey }); | ||
return (React.createElement("li", { onClick: () => onClickMenuItem(key), className: activeClass, key: index }, | ||
React.createElement("a", null, | ||
React.createElement("span", null, label)))); | ||
})))); | ||
return (React.createElement("div", Object.assign({ className: tabsCls }, restProps), | ||
React.createElement("ul", null, children))); | ||
}; | ||
Tabs.defaultProps = { | ||
size: 'small', | ||
type: 'toggle' | ||
}; | ||
Tabs.TabItem = TabItem; | ||
export default Tabs; |
/// <reference types="react" /> | ||
import { ISize } from '../interface'; | ||
export interface ITabItem { | ||
label: string; | ||
key: string; | ||
import { IAlignment, ISize } from '../interface'; | ||
export interface ITabsProps extends React.HtmlHTMLAttributes<HTMLDivElement>, ISize, IAlignment { | ||
fullwidth?: boolean; | ||
variant?: 'default' | 'boxed' | 'toggle' | 'toggle-rounded'; | ||
} | ||
export interface ITabsProps extends React.HtmlHTMLAttributes<HTMLDivElement>, ISize { | ||
tabItems: ITabItem[]; | ||
type?: 'boxed' | 'toggle' | 'toggle-rounded'; | ||
activeKey?: string; | ||
onClickItem?: (key: string) => void; | ||
export interface ITabItemProps extends React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> { | ||
active?: boolean; | ||
} | ||
export interface IWrappedTabComponentProps { | ||
TabItem: React.FC<ITabItemProps>; | ||
} |
/// <reference types="react" /> | ||
import { ISize } from '../interface'; | ||
export interface ITagGroupProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ISize { | ||
import { IAlignment, ISize } from '../interface'; | ||
export interface ITagGroupProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ISize, IAlignment { | ||
hasAddons?: boolean; | ||
alignment?: 'centered' | 'right'; | ||
} |
{ | ||
"name": "@corex/bulma", | ||
"version": "1.2.4", | ||
"version": "1.2.5", | ||
"main": "./dist/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32049
121
801