Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/omijs/tdesign into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dntzhang committed Oct 18, 2023
2 parents 29fc0bd + bd200cc commit f579db7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/skeleton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import _Skeleton from './skeleton'

import './style/index'

export type { TSkeletonProps } from './skeleton'
export type { SkeletonProps } from './skeleton'
export * from './type'

export const Skeleton = _Skeleton
export default Skeleton
export default Skeleton
4 changes: 2 additions & 2 deletions src/timeline/style/timeline-item.less
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
//label--alternate

.@{prefix}-timeline-item-label--alternate {
&.@{prefix}-timeline-global-left .@{prefix}-timeline-item{
&.@{prefix}-timeline-item-global-left .@{prefix}-timeline-item{

&__label {
text-align: right;
Expand All @@ -239,7 +239,7 @@
}
}

&.@{prefix}-timeline-global-right .@{prefix}-timeline-item{
&.@{prefix}-timeline-item-global-right .@{prefix}-timeline-item{
&__label {
text-align: left;
right: 0;
Expand Down
10 changes: 5 additions & 5 deletions src/timeline/timeline-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { StyledProps } from '../common'
import { TdClassNamePrefix, parseTNode } from '../utils'
import { isObject } from 'lodash'
import { getAlign } from './getAlign'
import timelineItemCss from './style/timeline-item.less'
import '../loading'

const DefaultTheme = ['default', 'primary', 'success', 'warning', 'error']
Expand All @@ -21,7 +22,7 @@ export interface TimelineItemProps extends TdTimelineItemProps, StyledProps, Sub

@tag('t-timeline-item')
export default class TimelineItem extends WeElement<TimelineItemProps> {
static css = css as string
static css = (css + timelineItemCss) as string
static defaultProps = { dotColor: 'primary' }
static propTypes = {
children: Object,
Expand Down Expand Up @@ -57,7 +58,6 @@ export default class TimelineItem extends WeElement<TimelineItemProps> {
mode,
} = props

console.log('item props: ', props)
const renderAlign = getAlign(globalAlign, layout)

// 计算节点模式 CSS 类名
Expand All @@ -78,11 +78,11 @@ export default class TimelineItem extends WeElement<TimelineItemProps> {
return ''
}

const ele = parseTNode(dot)
const ele = parseTNode(dot) as WeElement
let dotElement = undefined
if (isObject(ele)) {
dotElement = cloneElement(ele, {
class: classNames(ele?.attributes?.class, `${componentName}__dot-content`),
dotElement = cloneElement(ele as any, {
class: classNames(ele?.attributes?.['class'], `${componentName}__dot-content`),
})
}

Expand Down
2 changes: 0 additions & 2 deletions src/timeline/timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { StyledProps } from '../common'
import { TdClassNamePrefix } from '../utils'
import '../loading'
import { getAlign } from './getAlign'
import timelineItemCss from './style/timeline-item.less'

export interface TimelineProps extends TdTimelineProps, StyledProps {}

Expand Down Expand Up @@ -100,7 +99,6 @@ export default class Timeline extends WeElement<TimelineProps> {
}),
status: itemsStatus[index],
...itemProps,
css: timelineItemCss,
}),
)}
</ul>
Expand Down

0 comments on commit f579db7

Please sign in to comment.