Skip to content

Commit

Permalink
fix: fix some className (#1544)
Browse files Browse the repository at this point in the history
* docs(table): add checkbox disabled demo

* fix: fix some className

Co-authored-by: maxin <maxin@growingio.com>
  • Loading branch information
nnmax and maxin committed Nov 29, 2021
1 parent 92bb678 commit f7587ee
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/legacy/date-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
@import './yearPanel.less';
@import './monthPanel.less';
@import './decadePanel.less';
@import (reference) '../../input/style/index.less';

@date-picker-prefix-cls-legacy: ~'@{component-prefix}-date-picker-legacy';
@input-prefix-cls-legacy: ~'@{component-prefix}-input';

.@{date-picker-prefix-cls-legacy}-wrapper {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/form/style/index.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import '../../../stylesheet/index.less';
@import (reference) '../../input/style/index.less';

@icon-prefix-cls-legacy: ~'@{component-prefix}-icon';
@form-prefix-cls-legacy: ~'@{component-prefix}-form-legacy';
@field-prefix-cls-legacy: ~'@{component-prefix}-field';
@input-prefix-cls-legacy: ~'@{component-prefix}-input';

// form tokens map
@info-color: @color-font-form-notes;
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/pagination/style/index.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../../stylesheet/index.less';
@import (reference) '../../input/style/index.less';

@pagination-prefix-cls-legacy: ~'@{component-prefix}-pagination-legacy';
@input-prefix-cls-legacy: ~'@{component-prefix}-input';

.pagination-item {
display: inline-flex;
Expand Down
7 changes: 3 additions & 4 deletions src/legacy/search-bar/style/index.less
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
@import '../../../stylesheet/index.less';
@import (reference) '../../input/style/index.less';

@searchbar-prefix-cls-legacy: ~'@{component-prefix}-searchbar-legacy';
@input-cls: ~'@{component-prefix}-input';
@color-background-searchBar-icon-clear: #5c4e61;

.@{searchbar-prefix-cls-legacy} {
position: relative;
width: fit-content;
width: 100%;

.@{input-cls} {
.@{input-prefix-cls-legacy} {
width: inherit;
}

Expand Down Expand Up @@ -64,7 +63,7 @@

&-suffix {
&-close {
color: @color-background-searchBar-icon-clear;
color: #5c4e61;
cursor: pointer;
}
&-search {
Expand Down
3 changes: 2 additions & 1 deletion src/table/demos/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ export const Selectable = () => {
onChange: (selectedKeys) => {
// eslint-disable-next-line no-console
console.log(`🚀 selectedKeys: `, selectedKeys);
action(`rowSelection onChange`)(selectedKeys);
},
columnWidth: 60,
fixed: false,
// selectedRowKeys: [], // Controlled
getCheckboxProps: (record) => ({ disabled: record.id === '1' }),
getCheckboxProps: (record) => ({ disabled: record.age % 2 === 0 }),
};
return (
<Table<DataSourceType>
Expand Down
15 changes: 15 additions & 0 deletions src/tooltip/demos/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,18 @@ MultiLine.args = {
placement: 'right',
trigger: 'click',
};

export const Disabled = () => (
<div>
<p>
默认情况下,被禁用的元素(如 Button)不会触发用户交互行为,因此 hover 等普通的事件不会激活工具提示的显示。
若想容纳已禁用的元素激活工具提示,请添加一个简单的包装元素,如 span。
</p>

<Tooltip title="Button 被禁用了" placement="right">
<span>
<Button disabled>Disabled Button</Button>
</span>
</Tooltip>
</div>
);
4 changes: 2 additions & 2 deletions src/typography/style/Text.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

.@{text-prefix-cls} {
.font();
color: var(--color, 'inherit');
color: var(--color, inherit);
&--small {
font-size: 12px;
line-height: 20px;
}
&--midlle {
&--middle {
font-size: 14px;
line-height: 22px;
}
Expand Down

1 comment on commit f7587ee

@vercel
Copy link

@vercel vercel bot commented on f7587ee Nov 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.