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(notice-bar): shape and bordered prop #6691

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

guoyunhe
Copy link
Contributor

@guoyunhe guoyunhe commented Aug 1, 2024

增加 success 配色,shape 和 bordered 属性。

Copy link
Contributor

github-actions bot commented Aug 1, 2024

Size Change: +287 B (+0.08%)

Total Size: 358 kB

Filename Size Change
./lib/bundle/antd-mobile.compatible.umd.js 192 kB +147 B (+0.08%)
./lib/bundle/antd-mobile.umd.js 147 kB +32 B (+0.02%)
./lib/bundle/style.css 18.1 kB +108 B (+0.6%)
ℹ️ View Unchanged
Filename Size
./lib/bundle/css-vars-patch.css 1.42 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Aug 1, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
./lib/bundle/antd-mobile.es.js 103.44 KB (-68 B 🔽) 2.1 s (-0.07% 🔽) 1.1 s (+0.77% 🔺) 3.2 s

Copy link
Contributor

github-actions bot commented Aug 1, 2024

PR preview has been successfully built and deployed to https://antd-mobile-preview-pr-6691.surge.sh

@@ -34,6 +34,8 @@ export type NoticeBarProps = {
icon?: ReactNode
/** Whether to display multiple lines */
wrap?: boolean
/** Embedded mode with compact style */
embedded?: boolean
Copy link
Member

@zombieJ zombieJ Aug 1, 2024

Choose a reason for hiding this comment

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

这个属性类似于 Button 的形状配置,可以叫 shape: 'rectangular'(default) | 'square' + fill: solid | outline。这样就可以组合出需要的效果了。

or 直接 fill: outline 时自动加圆角。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个我们在实践中遇到不同的设计师有不同的偏好,在定制主题的时候,可能有边框,也可能没有边框,可能有圆角也可能没有圆角,用 shape 或 fill 的话,有可能会导致代码和效果不统一的情况。而且用 shape 和 fill 会带来非常多不同的排列组合,导致组件过于复杂。而 NoticeBar 应该没有 Button 那么多变种的需求。

@guoyunhe guoyunhe force-pushed the notice-bar-embedded branch 3 times, most recently from 6e52107 to 91ce9c6 Compare August 3, 2024 02:42
@guoyunhe guoyunhe changed the title feat(notice-bar): embedded feat(notice-bar): shape and bordered prop Aug 3, 2024
@guoyunhe guoyunhe force-pushed the notice-bar-embedded branch 3 times, most recently from bc910e2 to faf42db Compare August 3, 2024 03:02
package.json Outdated
@@ -41,7 +41,7 @@
"pub:dev": "npm publish ./lib --tag dev",
"size-limit": "size-limit",
"size-limit:ci": "size-limit --json",
"start": "dumi dev",
"start": "export NODE_OPTIONS=--openssl-legacy-provider && HOST=localhost dumi dev",
Copy link
Member

Choose a reason for hiding this comment

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

这个不要加进去,其他 script 不认识 export 定义。

border-right-width: var(--adm-notice-bar-border-width);
}

&-noborder {
Copy link
Member

Choose a reason for hiding this comment

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

without-border?

@zombieJ zombieJ merged commit 8e312d9 into master Aug 5, 2024
8 checks passed
@zombieJ zombieJ deleted the notice-bar-embedded branch August 5, 2024 06:04
Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

6 similar comments
Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

Copy link
Contributor

github-actions bot commented Aug 5, 2024

Deploy PR preview failed.

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.

2 participants