mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
37 lines
631 B
TypeScript
37 lines
631 B
TypeScript
import { use } from '../utils';
|
|
import { inherit } from '../utils/functional';
|
|
|
|
// Types
|
|
import { FunctionalComponent } from '../utils/use/sfc';
|
|
|
|
const [sfc, bem] = use('cell-group');
|
|
|
|
const CellGroup: FunctionalComponent<CellGroupProps> = function (
|
|
h,
|
|
props,
|
|
slots,
|
|
ctx
|
|
) {
|
|
return (
|
|
<div
|
|
class={[bem(), { 'van-hairline--top-bottom': props.border }]}
|
|
{...inherit(ctx, true)}
|
|
>
|
|
{slots.default && slots.default()}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export type CellGroupProps = {
|
|
border?: boolean
|
|
};
|
|
|
|
CellGroup.props = {
|
|
border: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
};
|
|
|
|
export default sfc(CellGroup);
|