Skip to content

Commit

Permalink
docs(sticky): 示例文档同步
Browse files Browse the repository at this point in the history
fix #415
  • Loading branch information
byq1213 committed Aug 6, 2024
1 parent 9024e60 commit 1888f75
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/sticky/_example/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import TDemoHeader from '../../../site/mobile/components/DemoHeader';
import './style/index.less';

import BaseDemo from './base';
import OffsetTopDemo from './offsetTop';
import OffsetTopDemo from './offset';
import ContainerDemo from './container';

export default function Base() {
return (
<div className="tdesign-mobile-demo">
<TDemoHeader title="Sticky 吸顶" summary="用于常驻页面顶部的信息,操作展示" />
<div className="tdesign-demo-block-wrap">
<TDemoBlock title="01 类型" summary="基础吸顶">
<TDemoBlock summary="基础吸顶">
<BaseDemo />
</TDemoBlock>
<TDemoBlock summary="吸顶距离">
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions src/sticky/sticky.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:: BASE_DOC ::

## API


### Sticky Props

name | type | default | description | required
-- | -- | -- | -- | --
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N
container | String / Function | body | Typescript:`ScrollContainer`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
disabled | Boolean | false | \- | N
offsetTop | String / Number | 0 | \- | N
zIndex | Number | 99 | \- | N
onScroll | Function | | Typescript:`(context: { scrollTop: number, isFixed: boolean }) => void`<br/>Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
5 changes: 3 additions & 2 deletions src/sticky/sticky.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
:: BASE_DOC ::

## API

### Sticky Props

名称 | 类型 | 默认值 | 说明 | 必传
名称 | 类型 | 默认值 | 描述 | 必传
-- | -- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
container | String / Function | body | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer` | N
container | String / Function | body | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
disabled | Boolean | false | 是否禁用组件 | N
offsetTop | String / Number | 0 | 吸顶时与顶部的距离,单位`px` | N
zIndex | Number | 99 | 吸顶时的 z-index | N
Expand Down
2 changes: 1 addition & 1 deletion src/sticky/style/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import '../../_common/style/mobile/components/sticky/_index.less';
import '../../_common/style/mobile/components/sticky/_index.less';

0 comments on commit 1888f75

Please sign in to comment.