Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(comp: button): add xs and lg sizes #780

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

liuzaijiang
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Component style update
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

What is the new behavior?

Other information

The default size is changed to 'sm'

@idux-bot
Copy link

idux-bot bot commented Mar 1, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #780 (8eb75c4) into main (3b8c9d9) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 8eb75c4 differs from pull request most recent head 6e51fbd. Consider uploading reports for the commit 6e51fbd to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #780      +/-   ##
==========================================
- Coverage   83.99%   83.96%   -0.04%     
==========================================
  Files         466      465       -1     
  Lines       12026    12034       +8     
  Branches     2890     2891       +1     
==========================================
+ Hits        10101    10104       +3     
- Misses       1925     1930       +5     
Impacted Files Coverage Δ
packages/components/button/src/types.ts 100.00% <ø> (ø)
packages/components/button/src/Button.tsx 96.42% <100.00%> (ø)
packages/components/image/src/types.ts 100.00% <0.00%> (ø)
...ackages/components/image/src/composables/useOpr.ts
packages/components/image/src/contents/OprIcon.tsx
...ponents/image/src/component/ImageViewerContent.tsx 89.65% <0.00%> (ø)
packages/components/image/src/ImageViewer.tsx 100.00% <0.00%> (+8.62%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b8c9d9...6e51fbd. Read the comment docs.

@@ -0,0 +1,5 @@
@width-xs: 56px;
Copy link
Member

Choose a reason for hiding this comment

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

除了 button 应该没有哪个组件会在使用这组变量了吧。
应该不需要定义这个,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

checkbox 和 radio的button状态都需要有最小宽度

Copy link
Member

Choose a reason for hiding this comment

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

checkbok 和 radio 的变量继承一下 button 的就好了。

@@ -27,7 +27,7 @@ export default defineComponent({
const formContext = inject(FORM_TOKEN, null)

const mode = computed(() => props.mode ?? groupProps.mode ?? 'default')
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'md')
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'sm')
Copy link
Member

Choose a reason for hiding this comment

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

这个会影响到所以使用 button 组件的其他组件,不能这么干吧。。。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

那就需要改为全局配置

Copy link
Member

Choose a reason for hiding this comment

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

行吧,改成全局配置吧。

@@ -27,7 +27,7 @@ export default defineComponent({
const formContext = inject(FORM_TOKEN, null)

const mode = computed(() => props.mode ?? groupProps.mode ?? 'default')
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'md')
const size = computed(() => props.size ?? groupProps.size ?? formContext?.size.value ?? 'sm')
Copy link
Member

Choose a reason for hiding this comment

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

行吧,改成全局配置吧。

@@ -0,0 +1,5 @@
@width-xs: 56px;
Copy link
Member

Choose a reason for hiding this comment

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

checkbok 和 radio 的变量继承一下 button 的就好了。

@liuzaijiang liuzaijiang force-pushed the refactor-button-lzj branch 2 times, most recently from b8053c8 to 763b086 Compare March 7, 2022 11:35
@danranVm danranVm merged commit 69f94c8 into IDuxFE:main Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants