Skip to content

Commit 456c353

Browse files
committed
feat: notification support configprovider.config
1 parent 322158d commit 456c353

File tree

8 files changed

+98
-92
lines changed

8 files changed

+98
-92
lines changed

components/_util/util.js renamed to components/_util/util.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { VueNode } from './type';
12
export const isFunction = val => typeof val === 'function';
23

34
export const isArray = Array.isArray;
@@ -67,4 +68,15 @@ export function toPx(val) {
6768
return val;
6869
}
6970

71+
export function renderHelper<T = Record<string, any>>(
72+
v: VueNode | ((arg0: T) => VueNode),
73+
props: T = {} as T,
74+
defaultV?: any,
75+
) {
76+
if (typeof v === 'function') {
77+
return v(props);
78+
}
79+
return v ?? defaultV;
80+
}
81+
7082
export { isOn, cacheStringFunction, camelize, hyphenate, capitalize, resolvePropValue };

components/config-provider/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const configConsumerProps = [
5858
];
5959

6060
export const defaultPrefixCls = 'ant';
61-
let globalPrefixCls = ref<string>();
61+
const globalPrefixCls = ref<string>();
6262

6363
type GlobalConfigProviderProps = {
6464
prefixCls?: MaybeRef<ConfigProviderProps['prefixCls']>;
@@ -154,6 +154,7 @@ export type ConfigProviderProps = Partial<ExtractPropTypes<typeof configProvider
154154

155155
const ConfigProvider = defineComponent({
156156
name: 'AConfigProvider',
157+
inheritAttrs: false,
157158
props: configProviderProps,
158159
setup(props, { slots }) {
159160
const getPrefixCls = (suffixCls?: string, customizePrefixCls?: string) => {

components/message/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ function getMessageInstance(args: MessageArgsProps, callback: (i: any) => void)
2323
}
2424
Notification.newInstance(
2525
{
26+
appContext: args.appContext,
2627
prefixCls: args.prefixCls || localPrefixCls,
2728
rootPrefixCls: args.rootPrefixCls,
2829
transitionName,
2930
style: { top: defaultTop }, // 覆盖原来的样式
3031
getContainer,
3132
maxCount,
33+
name: 'message',
3234
},
3335
(instance: any) => {
3436
if (messageInstance) {
@@ -92,7 +94,6 @@ function notice(args: MessageArgsProps): MessageType {
9294
duration,
9395
style: args.style || {},
9496
class: args.class,
95-
appContext: args.appContext,
9697
content: ({ prefixCls }) => {
9798
const Icon = iconMap[args.type];
9899
const iconNode = Icon ? <Icon /> : '';

components/modal/confirm.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { destroyFns } from './Modal';
66
import Omit from 'omit.js';
77
import ConfigProvider, { globalConfig } from '../config-provider';
88

9-
let defaultRootPrefixCls = '';
9+
const defaultRootPrefixCls = '';
1010

1111
function getRootPrefixCls() {
1212
return defaultRootPrefixCls;
@@ -42,7 +42,8 @@ const confirm = (config: ModalFuncProps) => {
4242
}
4343
function destroy(...args: any[]) {
4444
if (confirmDialogInstance && div.parentNode) {
45-
Object.assign(confirmDialogInstance.component.props, { vIf: false }); // hack destroy
45+
// destroy
46+
vueRender(null, div);
4647
confirmDialogInstance.component.update();
4748
confirmDialogInstance = null;
4849
div.parentNode.removeChild(div);
@@ -59,18 +60,18 @@ const confirm = (config: ModalFuncProps) => {
5960
}
6061
}
6162
}
62-
const Wrapper = (p: ModalFuncProps & { vIf: boolean }) => {
63+
const Wrapper = (p: ModalFuncProps) => {
6364
const { getPrefixCls } = globalConfig();
6465
const rootPrefixCls = getPrefixCls(undefined, getRootPrefixCls());
6566
const prefixCls = p.prefixCls || `${rootPrefixCls}-modal`;
66-
return p.vIf ? (
67+
return (
6768
<ConfigProvider prefixCls={rootPrefixCls}>
6869
<ConfirmDialog {...p} prefixCls={prefixCls}></ConfirmDialog>
6970
</ConfigProvider>
70-
) : null;
71+
);
7172
};
7273
function render(props: ModalFuncProps) {
73-
const vm = createVNode(Wrapper, { ...props, vIf: true });
74+
const vm = createVNode(Wrapper, { ...props });
7475
vm.appContext = config.parentContext || config.appContext || vm.appContext;
7576
vueRender(vm, div);
7677
return vm;

components/notification/__tests__/index.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('notification', () => {
1111
notification.destroy();
1212
});
1313

14-
it('should be able to hide manually', async () => {
14+
fit('should be able to hide manually', async () => {
1515
notification.open({
1616
message: 'Notification Title',
1717
duration: 0,

components/notification/index.tsx

Lines changed: 52 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
import type { VNodeTypes, CSSProperties } from 'vue';
1+
import type { CSSProperties } from 'vue';
22
import Notification from '../vc-notification';
33
import CheckCircleOutlined from '@ant-design/icons-vue/CheckCircleOutlined';
44
import InfoCircleOutlined from '@ant-design/icons-vue/InfoCircleOutlined';
55
import CloseCircleOutlined from '@ant-design/icons-vue/CloseCircleOutlined';
66
import ExclamationCircleOutlined from '@ant-design/icons-vue/ExclamationCircleOutlined';
77
import CloseOutlined from '@ant-design/icons-vue/CloseOutlined';
8+
import type { VueNode } from '../_util/type';
9+
import { renderHelper } from '../_util/util';
10+
import { globalConfig } from '../config-provider';
811

912
export type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
1013

@@ -14,21 +17,26 @@ export interface ConfigProps {
1417
top?: string | number;
1518
bottom?: string | number;
1619
duration?: number;
20+
prefixCls?: string;
1721
placement?: NotificationPlacement;
1822
getContainer?: () => HTMLElement;
19-
closeIcon?: VNodeTypes;
23+
closeIcon?: VueNode | (() => VueNode);
2024
}
2125

2226
const notificationInstance: { [key: string]: any } = {};
2327
let defaultDuration = 4.5;
2428
let defaultTop = '24px';
2529
let defaultBottom = '24px';
30+
let defaultPrefixCls = '';
2631
let defaultPlacement: NotificationPlacement = 'topRight';
2732
let defaultGetContainer = () => document.body;
2833
let defaultCloseIcon = null;
2934

3035
function setNotificationConfig(options: ConfigProps) {
31-
const { duration, placement, bottom, top, getContainer, closeIcon } = options;
36+
const { duration, placement, bottom, top, getContainer, closeIcon, prefixCls } = options;
37+
if (prefixCls !== undefined) {
38+
defaultPrefixCls = prefixCls;
39+
}
3240
if (duration !== undefined) {
3341
defaultDuration = duration;
3442
}
@@ -88,41 +96,37 @@ function getPlacementStyle(
8896
return style;
8997
}
9098

91-
type NotificationInstanceProps = {
92-
prefixCls: string;
93-
placement?: NotificationPlacement;
94-
getContainer?: () => HTMLElement;
95-
top?: string;
96-
bottom?: string;
97-
closeIcon?: VNodeTypes;
98-
};
99-
10099
function getNotificationInstance(
101100
{
102-
prefixCls,
101+
prefixCls: customizePrefixCls,
103102
placement = defaultPlacement,
104103
getContainer = defaultGetContainer,
105104
top,
106105
bottom,
107106
closeIcon = defaultCloseIcon,
108-
}: NotificationInstanceProps,
107+
appContext,
108+
}: NotificationArgsProps,
109109
callback: (n: any) => void,
110110
) {
111+
const { getPrefixCls } = globalConfig();
112+
const prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
111113
const cacheKey = `${prefixCls}-${placement}`;
112114
if (notificationInstance[cacheKey]) {
113115
callback(notificationInstance[cacheKey]);
114116
return;
115117
}
116118
Notification.newInstance(
117119
{
118-
prefixCls,
120+
name: 'notification',
121+
prefixCls: customizePrefixCls || defaultPrefixCls,
119122
class: `${prefixCls}-${placement}`,
120123
style: getPlacementStyle(placement, top, bottom),
124+
appContext,
121125
getContainer,
122-
closeIcon: () => {
126+
closeIcon: ({ prefixCls }) => {
123127
const closeIconToRender = (
124128
<span class={`${prefixCls}-close-x`}>
125-
{closeIcon || <CloseOutlined class={`${prefixCls}-close-icon`} />}
129+
{renderHelper(closeIcon, {}, <CloseOutlined class={`${prefixCls}-close-icon`} />)}
126130
</span>
127131
);
128132
return closeIconToRender;
@@ -143,13 +147,13 @@ const typeToIcon = {
143147
};
144148

145149
export interface NotificationArgsProps {
146-
message: VNodeTypes;
147-
description?: VNodeTypes;
148-
btn?: VNodeTypes;
150+
message: VueNode | (() => VueNode);
151+
description?: VueNode | (() => VueNode);
152+
btn?: VueNode | (() => VueNode);
149153
key?: string;
150154
onClose?: () => void;
151155
duration?: number | null;
152-
icon?: VNodeTypes;
156+
icon?: VueNode | (() => VueNode);
153157
placement?: NotificationPlacement;
154158
style?: CSSProperties;
155159
prefixCls?: string;
@@ -159,57 +163,46 @@ export interface NotificationArgsProps {
159163
top?: string;
160164
bottom?: string;
161165
getContainer?: () => HTMLElement;
162-
closeIcon?: VNodeTypes;
166+
closeIcon?: VueNode | (() => VueNode);
167+
appContext?: any;
163168
}
164169

165170
function notice(args: NotificationArgsProps) {
166171
const { icon, type, description, message, btn } = args;
167-
const outerPrefixCls = args.prefixCls || 'ant-notification';
168-
const prefixCls = `${outerPrefixCls}-notice`;
169172
const duration = args.duration === undefined ? defaultDuration : args.duration;
170-
171-
let iconNode = null;
172-
if (icon) {
173-
iconNode = () => <span class={`${prefixCls}-icon`}>{icon}</span>;
174-
} else if (type) {
175-
const Icon = typeToIcon[type];
176-
iconNode = () => <Icon class={`${prefixCls}-icon ${prefixCls}-icon-${type}`} />;
177-
}
178-
const { placement, top, bottom, getContainer, closeIcon } = args;
179-
getNotificationInstance(
180-
{
181-
prefixCls: outerPrefixCls,
182-
placement,
183-
top,
184-
bottom,
185-
getContainer,
186-
closeIcon,
187-
},
188-
notification => {
189-
notification.notice({
190-
content: () => (
173+
getNotificationInstance(args, notification => {
174+
notification.notice({
175+
content: ({ prefixCls }) => {
176+
let iconNode = null;
177+
if (icon) {
178+
iconNode = () => <span class={`${prefixCls}-icon`}>{renderHelper(icon)}</span>;
179+
} else if (type) {
180+
const Icon = typeToIcon[type];
181+
iconNode = () => <Icon class={`${prefixCls}-icon ${prefixCls}-icon-${type}`} />;
182+
}
183+
return (
191184
<div class={iconNode ? `${prefixCls}-with-icon` : ''}>
192185
{iconNode && iconNode()}
193186
<div class={`${prefixCls}-message`}>
194187
{!description && iconNode ? (
195188
<span class={`${prefixCls}-message-single-line-auto-margin`} />
196189
) : null}
197-
{message}
190+
{renderHelper(message)}
198191
</div>
199-
<div class={`${prefixCls}-description`}>{description}</div>
200-
{btn ? <span class={`${prefixCls}-btn`}>{btn}</span> : null}
192+
<div class={`${prefixCls}-description`}>{renderHelper(description)}</div>
193+
{btn ? <span class={`${prefixCls}-btn`}>{renderHelper(btn)}</span> : null}
201194
</div>
202-
),
203-
duration,
204-
closable: true,
205-
onClose: args.onClose,
206-
onClick: args.onClick,
207-
key: args.key,
208-
style: args.style || {},
209-
class: args.class,
210-
});
211-
},
212-
);
195+
);
196+
},
197+
duration,
198+
closable: true,
199+
onClose: args.onClose,
200+
onClick: args.onClick,
201+
key: args.key,
202+
style: args.style || {},
203+
class: args.class,
204+
});
205+
});
213206
}
214207

215208
const apiBase = {

components/tag/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`renders ./components/tag/demo/basic.vue correctly 1`] = `<div><span class="ant-tag">Tag 1<!----></span><span class="ant-tag"><a href="https://github.com/vueComponent/ant-design">Link</a><!----></span><span class="ant-tag">Tag 2<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close [object Object]-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><span class="ant-tag">Prevent Default<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close [object Object]-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span></div>`;
3+
exports[`renders ./components/tag/demo/basic.vue correctly 1`] = `<div><span class="ant-tag">Tag 1<!----></span><span class="ant-tag"><a href="https://github.com/vueComponent/ant-design">Link</a><!----></span><span class="ant-tag">Tag 2<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close ant-tag-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><span class="ant-tag">Prevent Default<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close ant-tag-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span></div>`;
44

55
exports[`renders ./components/tag/demo/checkable.vue correctly 1`] = `<div><span class="ant-tag ant-tag-checkable">Tag1</span><span class="ant-tag ant-tag-checkable">Tag2</span><span class="ant-tag ant-tag-checkable">Tag3</span></div>`;
66

@@ -12,13 +12,13 @@ exports[`renders ./components/tag/demo/colorful.vue correctly 1`] = `
1212
`;
1313

1414
exports[`renders ./components/tag/demo/control.vue correctly 1`] = `
15-
<span class="ant-tag">Unremovable<!----></span><span class="ant-tag">Tag 2<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close [object Object]-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span>
16-
<!----><span class="ant-tag">Tag 3Tag 3Tag 3Tag 3...<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close [object Object]-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><span class="ant-tag" style="background: rgb(255, 255, 255); border-style: dashed;"><span role="img" aria-label="plus" class="anticon anticon-plus"><svg focusable="false" class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span> New Tag
15+
<span class="ant-tag">Unremovable<!----></span><span class="ant-tag">Tag 2<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close ant-tag-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span>
16+
<!----><span class="ant-tag">Tag 3Tag 3Tag 3Tag 3...<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close ant-tag-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><span class="ant-tag" style="background: rgb(255, 255, 255); border-style: dashed;"><span role="img" aria-label="plus" class="anticon anticon-plus"><svg focusable="false" class="" data-icon="plus" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><defs><style></style></defs><path d="M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"></path><path d="M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"></path></svg></span> New Tag
1717
<!----></span>
1818
`;
1919

2020
exports[`renders ./components/tag/demo/controlled.vue correctly 1`] = `
21-
<span class="ant-tag ant-tag-hidden">Movies<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close [object Object]-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><br><button class="ant-btn ant-btn-sm" type="button">
21+
<span class="ant-tag ant-tag-hidden">Movies<span tabindex="-1" role="img" aria-label="close" class="anticon anticon-close ant-tag-close-icon"><svg focusable="false" class="" data-icon="close" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg></span></span><br><button class="ant-btn ant-btn-sm" type="button">
2222
<!----><span>Toggle</span>
2323
</button>
2424
`;

0 commit comments

Comments
 (0)