Skip to content

Commit

Permalink
style(checker): 更改选项框无文本的边距大小
Browse files Browse the repository at this point in the history
  • Loading branch information
79E committed Jan 3, 2023
1 parent 6e22ca2 commit 16a8950
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/components/checkbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ import { Checkbox } from 'aunt';

| 属性名 | 说明 | 默认值 |
| ---------------------------------------- | ---------------------- | -------------------------------- |
| --aunt-checker-margin | 外边距 | `0 0 var(--aunt-padding-xs) 0;` |
| --aunt-checker-size | 大小 | `var(--aunt-font-size-xxl);` |
| --aunt-checker-border-width | 边框大小 | `var(--aunt-border-width-base);` |
| --aunt-checker-border-style | 边框类型 | `solid;` |
Expand Down
1 change: 1 addition & 0 deletions src/components/checkbox/checker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const Checker: FunctionComponent<CheckerProps<{}>> = props => {
);
};
const renderChildren = () => {
if (!props.children) return null;
return <div className={joinTrim([ns.e('label')])}>{props.children}</div>;
};

Expand Down
5 changes: 2 additions & 3 deletions src/components/checkbox/styles/index.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@class-prefix: ~'aunt';

:root{
--aunt-checker-margin: 0 0 var(--aunt-padding-xs) 0;
--aunt-checker-size: var(--aunt-font-size-xxl);
--aunt-checker-border-width: var(--aunt-border-width-base);
--aunt-checker-border-style: solid;
Expand All @@ -10,14 +9,13 @@
--aunt-checker-active-color: var(--aunt-brand-color);
--aunt-checker-label-color: var(--aunt-text-color);
--aunt-checker-label-font-size: var(--aunt-font-size-lg);
--aunt-checker-label-margin: 0 var(--aunt-padding-xs);
--aunt-checker-label-margin: 0 0 0 var(--aunt-padding-xs);
--aunt-checker-disabled-color: var(--aunt-gray-4);
--aunt-checker-disabled-background-color: var(--aunt-gray-3);
}

.@{class-prefix}-checker {
display: flex;
margin: var(--aunt-checker-margin);
cursor: pointer;
user-select: none;
align-items: center;
Expand Down Expand Up @@ -74,6 +72,7 @@
}
&--horizontal{
flex-direction: row;
justify-content: space-between;
}
}
}

0 comments on commit 16a8950

Please sign in to comment.